Add software to Raspberry Pi

--Brian 21:34, 22 April 2012 (UTC)

To add software to a Linux machine you can download source files of code, compile them and install the software. Compiling software can be complex due to the fact that often, software has "dependencies" such as library software that is called by the software to provide support to a package. If the dependencies are missing, the software will not compile.

Another way to add software is to get binary files (EXE files on MS Windows are binaries). These files have been compiled by someone else for users to install. Binary files still have dependencies. (In Windows these dependencies are often missing DLL (Dynamic Linked Library) files.

To use software on a Raspberry Pi, you must have the software compiled for the particular processor that a Raspberry Pi has. This is an ARM processor. A lot of binary software downloaded from the Internet is for Intel processors, not ARM ones. Software is often "architecture dependent". The architecture being the various components making up the computer (including the processor) and the way they are connected together.

Luckily there is an alternative to compiling your own software.

Software on most Linux platforms is maintained via a "repository". This is a suite of programs that have been compiled by people who undertake to maintain a package for the community of people who look after the particular version of Linux. Often these are volunteers. Package maintainers ensure that the dependencies are taken care of as well.

To browse, install or uninstall the software, you use a "Package Manager". The default Raspberry Pi comes with a package manager called "apt". Apt stands for Advanced Packaging Tool and is the package manager software for Debian Linux.

Other package managers for other versions of Linux are yum (Yellowdog Update Manager) and rpm (Redhat Package Manager). If you put the Fedora build of Linux on your Raspberry Pi you will have to use the yum package manager which works in a similar way to apt.

To use apt you need to be able to search for software, install software and remove software. Addition and removal will almost certainly require root privileges or use of sudo - if upgrading, adding or removing, use sudo apt-get. If you are not running with root privileges, you may get a warning message. Searches for package names / contents do not require root privileges and can be done by any user.

To install a package where you already know the name

apt-get install

To search for software by name

apt-cache search

To update the repository database on your Raspberry Pi

apt-get update

To uninstall a previously installed package

apt-get remove 

To update all current packages with the latest version

apt-get upgrade