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 file under linux

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

Share

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

This article mainly introduces how to install.deb file under linux, which has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.

deb is an installation package for Unix systems (mainly Linux), based on tar packages, so it records file permissions (read/write/executable) and owner/user groups.

Because Unix-like systems have strict requirements for permissions, owners, and groups, and deb format installation packages often involve low-level system operations, permissions are particularly important.

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.

Let's go ahead and see how to install deb files.

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 where you downloaded the.deb file (it should be Downloads folder) and double-click on it.

Google Chrome deb file on Ubuntu

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

It will open the software center and you will see options when installing the software. All you need to do is click the install button and enter your login password.

Install Google Chrome in the Ubuntu Software Center

Installation of.deb files is performed through the Software Center.

See, 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 a little easier if things were always going well. But life isn't what we know it to be.

Now that you know that.deb files can be installed simply through the software center, let me tell you about some dependency bugs that packages might encounter.

An error occurs because a program may depend on another package (library). When a developer prepares a DEB package for you, he or she may assume that the package (library) you depend on already exists on your system.

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 can't handle such errors, so you have to use another tool called gdebi.

gdebi is a lightweight GUI application that has only one purpose for installing the deb package.

It identifies dependencies and attempts to install them at the same time as installing the.deb file.

gdebi handles dependencies when installing deb packages

Personally, I prefer to use gdebi rather than package center to install deb files. It is a lightweight application, so the installation process seems a bit faster. For more information, you can read Use gDebi and make 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: Install the.deb file from the command line using dpkg

If you want to install the deb package from the command line, you can use apt or dpkg. Actually, apt uses dpkg at the bottom level, but apt is more popular and easy to use.

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

sudo apt install path_to_deb_file

If you want to use the dpkg command for the deb package you are installing, here is how to do it:

sudo dpkg -i path_to_deb_file

In both commands, you should replace path_to_deb_file with the path and name of the deb file you downloaded.

Install deb files in Ubuntu using dpkg command

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

sudo apt install -f How to remove deb packages

Removing a deb package isn't a big deal. Also, you don't need the original deb file to install the program.

Method 1: Remove deb package using apt command

All you need is the name of the program you have installed, and then you can remove it using apt or dpkg.

sudo apt remove program_name

Now, the question is, how do you find the exact program name you need to use in the remove command? The apt command also has a solution for this.

You can use apt to find a list of all installed files, but doing this manually can be a headache. Therefore, you can use grep to search for your packages.

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 packages with "grid" in the name, 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. You can now use this program name in the apt remove command.

Method 2: Remove deb package using dpkg command

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 the 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 remove it using the dpkg command:

dpkg -r program_name

Tip: Update deb package

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

Thank you for reading this article carefully, I hope Xiaobian shared "How to install.deb file under linux" This article is helpful to everyone, but also hope that everyone will support more, pay attention to the industry information channel, more relevant knowledge waiting for you to learn!

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