Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "Add software to Raspberry pi"

From eLinux.org
Jump to: navigation, search
(Edited to improve readability and moved page)
m (Added need for sudo for apt-get commands in certain circumstances)
 
Line 20: Line 20:
 
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.
 
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.  
+
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
 
To install a package where you already know the name

Latest revision as of 15:49, 7 May 2012


--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 pi, you must have the software compiled for the particular processor that a 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 RPi 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 <name of software>

To search for software by name

apt-cache search <key word for search>

To update the repository database on your Rpi

apt-get update

To uninstall a previously installed package

apt-get remove <name of software to remove>

To update all current packages with the latest version

apt-get upgrade