| by Arround The Web | No comments

3 Ways to Install Local Debian Packages on Raspberry Pi

The Raspberry Pi is a Linux-based operating system that lets you install packages mainly through the command-line terminal. The good thing about the Raspberry Pi system is that you can install deb packages since not all packages are available in the official Raspberry Repository list. You may need to download a Debian package on your Raspberry Pi system based on your system architecture so that it can install the package from the source repository.

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:

$ wget https://packages.ntop.org/RaspberryPI/apt-ntop.deb

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:

$ sudo apt install ./<deb_package>

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:

$ sudo apt install ./apt-ntop.deb

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:

$ sudo apt remove apt-ntop -y

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:

$ sudo dpkg -i <deb_package>

Follow the below-mentioned command to install the local Debian package on Raspberry Pi:

$ sudo dpkg -i apt-ntop.deb

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:

$ sudo apt -f install

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:

$ sudo apt install gdebi

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:

$ sudo gdebi apt-ntop.deb

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.

Share Button

Source: linuxhint.com

Leave a Reply