Sometimes a .deb Package is Not Available on Repo & Available Elsewhere. Here is How to Install .deb Packages in Ubuntu or Other deb GNU/Linux. Normally we use a package manager like aptitude. In those cases we run –
apt-get install or
apt install is the name of the package, for example
nginx-custombuild. We are taking the case happening on server while using SSH. However, the same method can be used on local computer with a graphical user interface.
How To Install .deb Packages in Ubuntu or Other deb GNU/Linux
For security reasons, make 100% sure that the .deb package is from a reliable or trusted source.
.deb always bear a signature, yet this is important. We usually wget the package. After wget, we must make sure that the ownership is permissive to run the package. User should have sudo privilege, else need to append
sudo before the command.
.deb is called manual installation of packages and can be done via the dpkg command.
dkpg stands for – Debian Package Management System. dpkg is the backend to apt-get and aptitude.
.deb package is located where our current location is, then we can run any command in the formats written below :
dpkg --install package-name.deb
dpkg -i package-name.deb
We can run
man dpkg to read the manual or browse here :
for the advanced usages.
If, suppose the package is wget-ed to
/etc/cache/tmp, then we will install in this way :
dpkg -i -R /etc/cache/tmp/
Capital i, that is I is for info :
dpkg -I package-name.deb
Note : The above screenshot shows a custom version of NGINX with a different name, it is not the paid version, i.e. NGNIX Plus.
You possibly should run :
sudo apt-get install -f
-f Flag installs the unmet dependencies which might be needed the the package. In order to remove the deb package, you can simply run :
dpkg -l | grep 'package-name'
# read the output
dpkg -r package-name1.2
The above command is uninstallation.
package-name is becoming kind of
package-name1.2 as possibly there will be some version name. It can be same or different.
Follow the Author of this article :