C.H.I.P. by default runs a debian-based system, and it means that it uses APT package manager to install .deb files. There are several ways to install software - if the package already exists in the repos you can either install it with apt or with apt-offline, and if it does not you would have to find a .deb file and install it manually, normally by using dpkg. If you want to avoid installing the package on the command line, you can use Synaptic, which is a GUI helper for apt.
Installing directly from repositories using APT
In order to install something from the Debian repositories you would have to type:
sudo apt install package
where package is the name of the software you are willing to install.
So what do you do when you don't know the name of the package? You can search for a package like this:
apt search package
Need to remove something?
sudo apt remove package
Now, in order to know where all the packages are kept APT has a database, that basically has a list of all the installable packages and their recent versions. It is a good thing to do
sudo apt update
once in a while before installing something, so APT would have a most recent data. Sure thing eventually your software you have installed earlier would have an updated version. APT would tell you about it, and you would be able to upgrade your system by typing
sudo apt upgrade
into terminal. This would upgrade all the packages that repos have a newer version of.
Installing packages using APT-Offline
If your internet connection is slow or poor, or your wifi is not working, you can use APT-Offline to install packages from the repositories. It creates a signature file that you then have to find a way to transfer to another computer which also uses APT for package management, but which has better internet connectivity. You will need to install apt-offline on both your C.H.I.P. and the other computer.
sudo install apt-offline
Once you have installed apt-offline, the man page has excellent detailed instructions and examples.
If you are unable to use apt to install apt-offline on your C.H.I.P. computer, you will need to follolw the instructions in the section below and use dpkg to install apt-offline.
Installing .deb packages using dpkg
Debian is release based distribution, and it means that libraries versions are not being updated, instead only security fixes are being applied. This is a good way to ensure compatibility, because in Debian all the software shares the same libraries. So if application requires a more recent version of libraries, or just had not made it into release of Debian yet - you can find .deb packages for manual installation.
There are 2 gotchas to them:
- They should be for your version of Debian (Debian Jessie in case of CHIP). You would also find .deb files for Ubuntu, however these may not work, so installing them are not recommended.
- They should be for your architecture (arm or armhf in case of CHIP). Architecture is usually put into filename. If architecture is "all" it means that package is universal, and can be installed on any architecture. This is usually the case with Python packages.
To install .deb manually:
sudo dpkg -i filename.deb filename2.deb ... filenameN.deb
Keep in mind that you must be in the folder where .debs are located in. If you have done everything correctly - this would work. The package would be removable via APT later:
sudo apt remove package
just like software installed via APT itself.
It might be necessary to issue
sudo apt-get install -f
in order to install some missing dependencies, as dpkg is not pulling them when you install packages manually, so you are left with a broken dependencies instead.
If you feel like this is too much typing - you can install Synaptic. It is a GUI frontend for APT for people who do not like to use terminals.
But first, make sure that it is not already installed on your system. It generally comes pre-installed on at least some versions of C.H.I.P,
dpkg -l | grep synaptic
If it is not installed, then issue the following command:
sudo apt install synaptic
If you get a response "Package not found", that means you will need to update the package list on your C.H.I.P.
sudo apt update
With NTC's repositories offline, you will get error messages, but the other software lists will be downloaded. See Update CHIP Software for help with this.