Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Deb files on Ubuntu Linux

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "how to install Deb files on Ubuntu Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Deb format is the exclusive installation package format of Debian system, combined with APT software management system, has become a very popular installation package under Linux. The deb package is similar to .exe in windows and is very easy to install.

Install .deb files in Ubuntu and Debian-based Linux distributions you can choose a GUI tool or a command line tool to install a deb package. You have a choice.

Installation method:

Method 1: use the default software center in Ubuntu, the easiest way is to use the default software center. You don't have to do anything special here. Just go to the folder of the .deb file you downloaded (it should be the Downloads folder) and double-click on the file.

Double-click on the downloaded .deb file to start the installation.

It will open the Software Center, and you will see the options for installing the software. All you need to do is click the install button and enter your login password.

The installation of .deb files will be performed through the Software Center.

Look, it's even easier than installing a .exe file in Windows, isn't it?

Method 2: use the Gdebi application to install the deb package and its dependencies. Again, life might be easier if things always go well. But life is not what we know.

Now that you know that .deb files can be installed simply through the software center, let me tell you some dependency errors that the package may encounter.

The reason for the error is that one program may depend on another package (library). When a developer prepares a DEB package for you, he or she may assume that your system already has a dependent package (library).

But if this is not the case, and your system does not have the required packages (libraries), you will encounter the infamous "dependency error".

The software center cannot handle such errors, so you have to use another tool called gdebi.

Gdebi is a lightweight GUI application that serves only one purpose of installing the deb package.

It will identify dependencies and try to install them while installing the .deb file.

Gdebi handles dependencies when installing the deb package

Personally, I prefer to use gdebi rather than the package Center to install deb files. It is a lightweight application, so the installation process looks a little faster. For more information, you can read about using gDebi and making it the default setting for installing DEB packages.

You can install gdebi from the Software Center or by using the following command:

Sudo apt install gdebi method 3: use dpkg to install .deb files from the command line. If you want to install the deb package on the command line, you can use the apt command or the dpkg command. In fact, the apt command uses the dpkg command at the bottom, but apt is more popular and easier to use.

If you want to use the apt command on the deb file, use it like this:

Sudo apt install path_to_deb_file if you want to use the dpkg command on the deb package you are going to install, here is how to do it:

Sudo dpkg-I path_to_deb_file in these two commands, you should replace path_to_deb_file with the path and name of the deb file you downloaded.

If you get a dependency error while installing the deb package, you can use the following command to fix the dependency problem:

How sudo apt install-f removes deb packages removing a deb package is not a big deal. Also, you don't need the original deb file used to install the program.

Method 1: use the apt command to remove the deb package all you need is the name of the program you have installed, and then you can use apt or dpkg to remove the program.

Sudo apt remove program_name now, the question is, in the remove command, how do you find the exact program name you need to use? To do this, the apt command also has a solution.

You can use the apt command to find a list of all the installed files, but completing the process manually can be a headache. Therefore, you can use the grep command to search for your package.

For example, in the previous section, I installed the AppGrid application, but if I want to know the exact program name, I can use something like this:

Sudo apt list-- installed | grep grid this will give me all the software packages with "grid" in their names, from which I can get the exact program name.

Apt list-- installed | grep gridWARNING: apt does not have a stable CLI interface. Use with caution in scripts.appgrid/now 0.298 all [installed,local] as you can see, a package called "appgrid" has been installed. Now, you can use this program name in the apt remove command.

Method 2: use the dpkg command to remove the deb package. You can use dpkg to find the name of the installed program:

Dpkg-l | grep grid this output will be given to all packages with "grid" in their name.

Dpkg-l | grep gridii appgrid 0.298 all Discover and install apps for Ubuntu the ii in the command output above means that the package has been installed correctly.

Now that you have the program name, you can use the dpkg command to remove it:

Dpkg-r program_name hint: update deb package

Some deb packages (like Chrome) provide updates through system updates, but for most other programs, you will have to remove existing programs and install newer versions later.

This is the end of "how to install Deb files on Ubuntu Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report