How to install deb files on Ubuntu

Install deb on Ubuntu

I still remember the early days of using Ubuntu. My mentor explained to me how to install a program like VLC from the terminal, and for me it was something magical to be able to install things without having to search for the software on the Internet, just like that. Things changed for me when what I was looking for was not in the official repositories, for which he recommended me to Google the software in question followed by "deb". Basically, he explained to me the same thing that many of you want to know when you go to Google and type something like install deb ubuntu.

The first thing I want to say before continuing is that it is necessary to make clear what the DEB packages. They are Ubuntu's native installation packages and derivatives, and they come as an inheritance from its parent Debian, hence the package logo and its name. These DEB packages can be found in the official repositories, but are also offered as an option by different developers, such as Google with its Chrome web browser. The installation can be a complete "to go ahead", but here we are going to explain all the options so that no .deb package resists us.

Install deb from Ubuntu installer

As we have mentioned, if everything works fine on our Ubuntu operating system or some derivative, the process should be a lossless path. The first thing we have to try when we download a DEB file over the Internet is to do double click on it And see what happen. Because something has to happen, but what will depend on the version of Ubuntu or derivative that we are using. For example, and this is for an article, if we double click on a DEB from the Daily Build of Ubuntu 23.04 (April 2023), what will open is the Snap Store with its logo and everything. But it is not the same in the latest stable version that is available at the time of writing this article.

Install software

By double-clicking, what we will see will be something similar to the previous screenshot. If we look at the dash, we see that what you have opened is an application called "Install Software", and that Ubuntu Software is next to it closed. This means that, by default, double-clicking on a DEB file will open the software installer of Ubuntu, and to finish the installation we will only have to click on Install and wait for the process to finish.

As a detail, above, in the source drop-down menu, we see "Local file (deb)" which indicates that it is a file that we have downloaded in a different way to any software store.

Install deb from Ubuntu Software (or not)

Install from Ubuntu Software

By default, Ubuntu has its own software store installed, for some time now called Ubuntu Software. But what it really is is a version of GNOME Software with certain restrictions and some changes that harm us. The highlight is that it prioritizes Canonical snap packages, and unless some hacker tells me I'm wrong, support for flatpak packages cannot be added to it.

The final steps to install a DEB package from Ubuntu Software, or with the GNOME Software that we will explain below, are the same as those of the default installer. The difference is that before we will have to choose to install it with Ubuntu Software. For this, we will have to do secondary click, choose "Open With", scroll down, find Ubuntu Software, and then click Open.

We should see something like the Ubuntu installer, but also we can see an error message saying that the package type is not supported. If this is the case, the GNOME store does should not fail us.

With GNOME Software (or neither)

To be able to install a deb with GNOME Software, you must first install the GNOMEsoftware really, the one offered by Project GNOME. To do this, we have to open a terminal and type:

sudo apt install gnome-software

Once installed, we will have to secondary click on the DEB package and choose Software installation. The other option, very similar, is Install software, which is the official installer of the operating system. Once the desired option is chosen, we should see an image similar to the first one, but we can also find the following error, the same one that Ubuntu Software gives us on the date of publication of this article:

Failed to install

If it goes well, we just have to click on "Install" and wait for the process to finish. If it fails, this can happen depending on the operating system and the moment (date) in which we try it, what is 100% sure is the installation from the terminal.

From Terminal

Install deb from terminal

You can be like me, that although I don't get along badly with the terminal, I prefer graphical interfaces, but what tends to fail the least and works on most operating systems is to pull Command line. To install a DEB from the terminal, we will write the following command, substituting "PACKAGE" for the name of the package to install with path included:

sudo dpkg -i PAQUETE

By pressing enter, we will see that the installation begins, something similar to when we wrote the famous sudo apt update && sudo apt upgrade. When it is finished, we will see the "prompt" on duty and we will be able to verify that the application is already installed.

Chrome installed on Ubuntu

A couple of details

If you don't like the default installer and prefer to use Ubuntu Software or GNOME Software, first of all, logically, you have to check that the installation does not fail, and that will depend on the Ubuntu/Debian-based operating system you are using. In case it works, in the menu that appears when secondary clicking (see screenshots above) there is a switch which says "Always use for this file type". If we activate it, it will open the DEB packages by default when double-clicking with the program we have chosen.

The other thing to keep in mind is that the terminal command not only installs the package, but also respects the nature of the package and, if it has to add an official repository, as is the case with browsers like Google and Vivaldi or the editor Visual Studio Code, will add it.

From my point of view, it is best to use the native option of the operating system, and if it fails, try the other alternatives. In any case, I hope that some of what I have explained here has been of help to you.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Atik said

    In my case I'm more of a terminal, but sometimes it's easier for me to do it with Gdebi.
    Whatever the taste of the user: ubuntu is wonderful, there are a thousand ways to do things, and all of them are valid and efficient.
    regards