Oct 20, 2018 - This guide shows how to manually install.deb files using the command line tool dpkg in Debian-based Linux distributions. In this article, I am going to show you how to install DEB packages on Ubuntu using different package managers. So, let’s get started. Installing DEB packages with DPKG: dpkg is a package manager for Debian and all the Debian based operating systems such as Ubuntu, Linux Mint etc. Dpkg can install packages from DEB files. But there is a.
When you use apt to install a package, under the hood it uses dpkg. When you install a package using apt, it first creates a list of all the dependencies and downloads it from the repository.Once the download is finished it calls dpkg to install all those files, satisfying all the dependencies.So if you have a.deb file:.You can install it using: sudo dpkg -i /path/to/deb/filesudo apt-get install -f.You can install it using sudo apt install./name.deb (or sudo apt install /path/to/package/name.deb).With old apt-get versions you must first move your deb file to /var/cache/apt/archives/ directory. For both, after executing this command, it will automatically download its dependencies.Install gdebi and open your.deb file using it ( Right-click - Open with). It will install your.deb package with all its dependencies.( Note: APT maintains the package index which is a database of available packages available in repo defined in /etc/apt/sources.list file and in the /etc/apt/sources.list.d directory. All these methods will fail to satisfy the software dependency if the dependencies required by the deb is not present in the package index.)Why use sudo apt-get install -f after sudo dpkg -i /path/to/deb/file (mentioned in first method)?From man apt-get: -f, -fix-brokenFix; attempt to correct a system with broken dependencies in place.When dpkg installs a package and a package dependency is not satisfied, it leaves the package in an 'unconfigured' state and that package is considered broken.sudo apt-get install -f command tries to fix this broken package by installing the missing dependency.
Here's the best way to install a.deb file on Ubuntu on the command-line: sudo gdebi skype.debIf you don't have gdebi installed already, install it using sudo apt install gdebi-core. Why gdebi?gdebi will look for all the dependencies of the.deb file, and will install them before attempting to install the.deb file.
I find this much preferable than sudo dpkg -i skype.deb && sudo apt install -f. The latter is much too eager to remove dependencies in certain situations. For instance, when I tried to install Skype, it attempted to remove 96 (!) packages, including packages like compiz and unity! Gdebi gave a much clearer error message: $ sudo gdebi skype.debCannot install 'libqtgui:i386'(Here is, by the way.).
The simplest answer would be to use dpkg by running dpkg -i packagename.deb. You could then uninstall it by running dpkg -r packagename.deb.apt-get is a higher level installer based off of dpkg, and as such you could apt-get install packagename.deb.It would be beneficial for add it to your apt-get archives directory ( /var/cache/apt/archives) so you could reference it as a package with dependencies and not a standalone.deb archive.Also, by adding it to your apt-get archives directory, you have the opportunity to use dependencies with apt-get install packagename. This would let you install it with any manually added dependencies instead of dpkg's standalone archive-based system. It is very simple if I want to install Chrome.Install your Chrome file as: dpkg -i googlechrome.deb.Sometimes there is a chance of getting some dependency errors like the following: dpkg: dependency problems prevent configuration of google-chrome-stable:google-chrome-stable depends on libappindicator1; however:Package libappindicator1 is not installed.So to resolve above issues, you need to add dependencies; give the following command: apt-get install -fAfter giving the above command, dependencies will be added to your machine and your Debian package (.deb) file will be installed.
In this tutorial we will learn how to install local software packages (.DEB) in Debian and its derivatives such as Ubuntu and Linux Mint using three different command line tools and they are, and gdebi.This is useful to those new users who have migrated from Windows to Ubuntu or Linux Mint. The very basic problem they face is installing local software on system.However, Ubuntu and Linux Mint has its own Graphical Software Center for easy software installation, but we will be looking forward to installing packages through terminal way.
Install Software Using Dpkg Commandis a package manager for Debian and its derivatives such as Ubuntu and Linux Mint. It is used to install, build, remove and manage.deb packages. But unlike other Linux package management systems, it cannot automatically download and install packages with their dependencies.To install a local package, use the dpkg command with the -i flag along with package name as shown. $ sudo dpkg -i teamvieweramd64.deb. Install Local Package in UbuntuIf you get any dependency errors while installing or after installing and launching a program, you can use the following apt command to resolve and install dependencies using the -f flag, which tells the program to fix broken dependencies. $ sudo apt-get install -fTo remove a package use -r option or if you want to remove all its files including configuration files, you can purge it using the -purge option as shown. $ sudo dpkg -r teamviewer Remove Package$ sudo dpkg -purge teamviewer Remove Package with Configuration Files.
Remove Package in UbuntuTo know more about installed packages, read our article that shows how to. Install Local Package Using apt-get in UbuntuTo remove a package use remove option or if you want to remove all its files including configuration files, you can purge it using the purge option as shown. $ sudo apt-get remove teamviewer$ sudo apt-get purge teamviewerOR$ sudo apt remove teamviewer$ sudo apt purge teamviewer3. Install Software Using Gdebi Commandgdebi is a tiny command-line tool for installing local deb packages.
It resolves and installs package dependencies on the fly. To install a package, use the following command. $ sudo gdebi teamviewer13.1.3026amd64.deb. Install Local Packages Using Gdebi in UbuntuTo remove a package installed from gdebi, you can use apt, apt-get or dpkg commands using purge option as shown. $ sudo apt purge teamviewerOR$ sudo apt-get purge teamviewerOR$ sudo dpkg -purge teamviewerThat’s It! In this tutorial, we have explained three different command line tools for installing or removing local Debian packages in Ubuntu and Linux Mint.If you know any other way of installing local packages, do share with us using our comment section below.