3 Ways to Install Local Debian Packages on Raspberry Pi
This article will show different ways to install local Debian packages (.deb) on your Raspberry Pi system.
3 Ways to Install Local Debian Packages on Raspberry Pi
There are three ways to install local Debian packages on your Raspberry Pi system:
However, before moving towards each method, make sure that you have downloaded a Debian package on your Raspberry Pi system. In my case, I have downloaded Network Monitoring Tool (ntop) package on 64Bit Raspberry Pi OS through the following command:
You must download a Debian package based on your system architecture. After successfully downloading the deb package, you can move forward toward the installation methods.
Method 1: Install Local Debian Packages on Raspberry Pi Through Apt Command
The easiest and most widely used method to install the local Debian packages is the apt command. It directly installs the package dependencies from the official Raspberry Pi source list. To install a local Debian package through apt, follow the below-mentioned command:
So, to install the ntop deb file replace <deb_package> from the above command and ensure you are in the same directory where the package is placed; use the command given below:
If the file is some other directory, then provide the path also.
Remove Local Debian Package from Raspberry Pi
You can easily remove the local Debian package from the Raspberry Pi system from the following: command:
Don’t forget to replace apt-ntop with the Debian package you want to remove from your Raspberry Pi system.
Method 2: Install Local Debian Packages on Raspberry Pi Through dpkg Command
You can also install the local Debian package through the dpkg command. The dpkg command doesn’t install package dependencies from the Raspberry Pi official repository; instead, it installs dependencies by itself.
The syntax is given below:
Follow the below-mentioned command to install the local Debian package on Raspberry Pi:
So, in some cases, you may find issues related to installing dependencies of a package. In case of any dependency error, you can use the following command to solve the issue:
The removal process is like the one already provided in Method 1.
Method 3: Install Local Debian Packages on Raspberry Pi Through gdebi Command
gdebi is a command-line utility used to install local Debian packages on Linux systems like Raspberry Pi. It installs dependencies from the software repository instead of installing them from the official Raspberry Pi repository. This tool isn’t installed on your Raspberry Pi system by default and you can use the following command to install it on your system:
In my case, I have already installed it on my system.
After the installation, you can install a local Debian package from gdebi using the following command:
Press “y” to confirm the local Debian package installation through gdebi.
This will successfully install the package on Raspberry Pi. You can remove the package using the process discussed in Method 1.
Conclusion
Installing the local Debian package on the Raspberry Pi system isn’t a complex task since there are three easy ways to install any deb package within seconds. You can use the recommended method at the top to install the Debian package through the apt command. However, you can also try installing the package from the dpkg or gdebi command.
Source: linuxhint.com