Results 1 to 10 of 11
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-06-2006 #1
How To Install Software in Linux
Installing Software in GNU/Linux
Originally posted by Jason Lambert
For the benefit of people new to Linux, I have written a generic explanation of howto install software in Linux. Note that some software may have specific installation procedures, this HOWTO is not a substitute for reading the official installation documentation
This HOWTO covers the following topics:
- Compiling and Installing software from source
- Installing RPM's using the Redhat Package Manager
- Installing using Debian's apt-get
- Installing mandrake things
- Installing with fedora / yum
- Installing slackware packages
- Installing software using Gentoo EMerge
- Installing binary files (.BIN/.SH)
- Installing .package Files (AutoPackage)
Graphical (GUI) process:
- Using Synaptic (Fedora, Ubuntu)
- Using YaST2 (SuSE, openSuSE)
If you have just installed GNU/Linux and would like to know how to install software on your new OS, I would recommend you read the section specifically for your GNU/Linux Distribution.
Note: for new users, it is generally easiest/best to install any software using the default package tool that is included with your particular distribution.
Do not worry if you don't understand or remember everything written here straight away, book mark this page and use it as a reference page later on.
Last edited by techieMoe; 03-24-2010 at 02:01 PM.
- 07-06-2006 #2
Compiling and Installing software from source
NOTE - Installing from source code is the most difficult method for obtaining software on Linux and in most cases is not necessary. Most popular software can be found and installed quite easily using your distribution's package manager (see sections on "apt-get" and "yum"). Installing from source is recommended only for experienced Linux users and/or those who aren't afraid to break something for the purpose of learning.
Some software is distributed in "Source form". This means you download a file containing all the source code for the application you want to install, unpack it, and compile it on your system. Compiling is the process of turning the source code into an executable binary. The common myth and newbie assumption is that this is very hard todo, or it is only for programmers. Wrong. It is a fairly straight forward process, and you will find that a lot of software you install will need to be built from source.
Typically applications you must compile from source will come as a ".tar.gz", ".tar.bz2", or ".zip" file.
You'll probably want to operate from inside your home directory. If your user is (for example) username, your home directory will be /home/username/. For the rest of this section we will assume you have downloaded your zip file to /home/username/src. If you do not have a src directory, you can create it with the following "mkdir" (make directory) command:
Change to the /home/username/src/ directory with the "cd" (change directory) command like so:
We now need to unzip the zipped file, this is done differently depending on the file extension.
for files ending in .tar.gz, use:
tar -zxvf <filename>
for files ending in .tar.bz2, use:
tar -jxvf <filename>
This is where things will differ. Some packages will have an INSTALL or README file which will contain installation instructions. use "ls" to see if the software has an install or readme file. If it does have one, you can use the "more" command to read it, like so:
- Configure the installation
- Compile the software
- Install the binaries
The pre-installation configuration is done by executing ./configure:
The next stage is to compile the software, this is done using "make". When you run "make" it will read the instructions in the Makefile and build the application binaries.
The final stage is to install these binaries, ie, copy them to a more permanent location. Typically only the "root" user can do this, so you will need to swich to the root user with the "su" command:
Remember that if you have any problems, please post in the most relevant section of the forums. - When posting, remember to include as much info as possible, including all output and error messages.
Last edited by techieMoe; 03-24-2010 at 01:56 PM. Reason: Changed reference to /usr/local
- 07-06-2006 #3
Installing RPM's using the Redhat Package Manager
Redhat RPM's offer a flexable and easy method to install new software. Software installed from an RPM package differs from compiling from source in a few ways, but the most important one of all is the software is already compiled for you. Essentially all you are doing is extracting the pre-built binaries and copying them to their pre-selected destination. RPM's are files that have a ".rpm" extenstion. The good point about RPM's is installation of new software, and maintaining the software currently installed is much easier than doing so for individual packages compiled from source. The downside to RPM's is that you dont have as much choice about where software is installed on your system, how it is compiled, and how it is configured.
Using the RPM system is fairly straight forward. To install a package, you can use the following command:
rpm -i <filename.rpm>
Un installing a package is just as easy:
rpm -e <package>
Note that <package> is different from <filename> used when installing.
For example, if you are installing an application called "mysoftware", you may use a command like "rpm -i mysoftware-1.0.2-i386.rpm" to install "mysoftware", when removing we dont follow the filename for installation, but rather the name of the software itself.
For further uses of RPM, please use "rpm --help" and "man rpm". Also see this page, which has some fairly useful information.
If you need to find & download the RPM file for a piece of software, I recommend using
RPM Find and RPM Pbone Search Note that not all applications are available as RPM's, in these cases you will need to compile the software from source. (see above).
- 07-06-2006 #4
Installing software with Apt-get
APT (Advance Packaging Tool) is a wonderful package management system. It consists of different tools, which names usually begins with "apt-" : apt-get, apt-cache, apt-cdrom, etc. Unlike RPM, which equivalent in a Debian system would probably be DPKG, apt-get handles dependencies resolution and takes care of downloading the software for you (much like YUM in a Red Hat system).
Though apt-get is generally used to install binary packages, it also can build and install source packages (like Gentoo's emerge). One can further more ease the process of installing software by using Synaptic (Graphical Interface), which is considered more featured APT frontend.
aptitude is a terminal-based apt frontend with a number of useful features, including: a mutt-like syntax for matching packages in a flexible manner, dselect-like persistence of user actions, the ability to retrieve and display the Debian changelog of most packages, and a command-line mode similar to that of apt-get. One should use aptitude to install meta-packages because aptitude keeps log of all packages that are part of meta-package. Its easy to remove/un-install meta-package in one go with aptitude.
One must have root privileges to execute apt-get or aptitude commands. Execute 'su' in Debian and prefix 'sudo' in Ubuntu to gain root privileges.
apt-get depends on Debian packages repositories (where are stored both sources and binary packages) that can be configured in the file /etc/apt/sources.list. A typical Debian stable sources.list would look something like this :
#Local Mirror deb ftp://ftp.us.debian.org/debian/ stable main contrib non-free deb-src ftp://ftp.us.debian.org/debian/ stable main contrib non-free #Security Updates deb ftp://ftp.us.debian.org/debian-security/ stable/updates main contrib non-free deb-src ftp://ftp.us.debian.org/debian-security/ stable/updates main contrib non-free
One can also configure APT to follow the testing or the unstable distribution of Debian.
Once the user has a sources.list adapted to his/her needs, the local list of packages needs to be updated :
To search a package from its text description :
apt-cache search <something>
apt-cache search irc client
To know more about a package and its description (dependencies, functionnalities, maintainer's identity, etc.) :
apt-cache show <package_name>
Installating a binary package is done in one single step :
apt-get install <package_name>
apt-get build-dep <package_name>
apt-get source -b <package_name>
apt-get build-dep pine apt-get source -b pine
apt-get remove <package_name>
apt-get remove --purge <package_name>
Further reading : Debian Reference, Chapter 6 - Debian package management
For the impatient : Debian Quick Reference, Chapter 3 - Debian package management
Last edited by devils casper; 09-05-2007 at 11:46 AM.
- 07-06-2006 #5
Installing software on Mandrake with urpm
urpm is a nifty was to install software on any 7.x or greater Mandrake system. Some of the advantages of Mandrake's urpm utilities are:
* It automatically solves package dependencies issues by installing or uninstalling dependent packages.
* It installs packages and dependencies directly from the internet.
* It allows globbing of package names
* It will automatically update your system.
* It will install all those "not allowed to distribute" programs that you really want to have (DVD support, MP3 enoders, etc...)
How do I install urpm?
urpm should be installed by default on any modern Mandrake distobution. If it's not, you can install it using the Mandrake Control Center (MCC).
The most commonly used command is urpmi. This command allows you to install packages from your configured sources (see below). urpmi will try to install all package dependencies. It will also take partitial names and give you a list of available packages. For exmaple, if you wanted to install one of the kdemoreartwork styles, but didn't know the exact name, you simple type
[root@cayanne ~/]#urpmi kdemoreartwork
[root@cayanne ~/]#urpmi libdvdcss
The urpme command deletes, or erases, currently installed packages and all packages depandant on that it.
The urpmq command searches for, or queries, for packages that you list.
The urpmf command does an advanced search for a filename in all known packages. For example if we are trying to compile a program and the configure script is complaining about not finding ncurses.h, we can do a urpmf ncurses.h to find that it is part of the libncurses5-develpackage.
[root@cayanne ~/]#urpmf ncurses.h libncurses5-devel:/usr/include/ncurses.h libncurses5-devel:/usr/include/ncurses/ncurses.h php-devel:/usr/src/php-devel/extensions/ncurses/php_ncurses.h
urpmi.addmedia does exactly that, makes an rpm reposatory available for urpm to utalize. Typically, you have your installation cd's available as a default media, these are called main. In addition, you also have three other media - updates,contrib and PLF. Updates is the updates, and contrib is user contributed rpm's and PLF is all those not available for distribution for so-called legel reasons rpm's. The sysntax for urpmi.addmedia is
urpmi.addmedia [media-name] [ftp-address with] ../base/hdlist.cz
Note that the hdlist.cz is required. For example, to add medium 'contrib', we use the following command
[root@cayanne ~/]#urpmi.addmedia contrib ftp://ftp.sunet.se/pub/Linux/distributions/mandrake/updates/8.2/RPMS with ../base/hdlist.cz added medium contrib retrieving description file of "contrib"... ...retrieving done retrieving source hdlist (or synthesis) of "contrib"... ...retrieving done examining whole urpmi database
This command removes specified media. Need I say more?
The urpmi.update command goes through all of your media sources and updates your installed packages if necessary.
How do I set up urpm?
urpm can be set up using MCC, but I've personally found the instructions at the web-site Easy Urpmi to be a little easier. Either way, you can use the site along with MCC or the console to add media. Simple follow the step-by-step instructions, and enter the command it prints out in the grey box into any terminal window, as root of course. You can even copy and paste the command, there's no need to type it all in.
Now that you're up and running with urpmi, try to install a few packages! Have fun!
Where can I get more info?
Some site in Texas
Last edited by devils casper; 02-21-2009 at 10:49 AM. Reason: removed broken links
- 07-06-2006 #6
- 07-06-2006 #7
Installing slackware packages
Slackware packages are usually .tgz files containing pre-built binaries. To install software in slackware you will need to find and download the .tgz package manually beforehand. If you are looking for a slackware package for a piece of software and have not found it yet, search Linux Packages for it.
Ok, once we have our package, lets install it. To install slackware packages, ensure you are the root user using the command:
Anyone who likes the debian apt-get system but is currently using Slackware may be interested to hear about a utility called slapt-get, the Slackware answer to apt-get. Slapt-get is avaible from Here. There is also a nifty Gnome/GTK front end for slapt-get in development, you can preview it at the same url.
Lastly, if you are having trouble locating a slackware package, but have been able to find a equivilent RPM, you can "convert" that RPM to a slackware package which you can use with the installpkg and removepkg commands. To convert your RPM to .tgz, use the command:
- 07-06-2006 #8
Installing software using Gentoo Emerge
Gentoo Emerge Documentation
Paludis, another package manager that uses Emerge
Installing Binary Files and Scripts (.BIN/.SH)
Binary files (.BIN) and shell scripts (.SH) are another popular format for distributing applications, particularly in the commercial, closed-source world. A good example of this are the Quake 3 and Doom 3 games from id Software. Basically all these files are is a list of commands that are run inside a terminal to copy, move, and create files in your file system. You can run these files like so:
For BIN files:
1. Make sure the file is set to "executable" by running this command:
chmod +x NameOfYourFile.bin
For .SH files:
1. Make sure the file is executable by following Step 1 above.
2. Run the file either with the same command as the previous Step 2, or like this:
Last edited by techieMoe; 03-24-2010 at 02:20 PM.
- 12-17-2008 #9
Installing .package Files
In recent years some folks have decided that the existing systems for package management (RPM and DEB) are lacking in certain ways and these people have seen fit to create other systems for installing software. One such system is AutoPackage.
The file extension for AutoPackage files is .package, and they are essentially executable shell scripts that build the desired software on your local machine regardless of its package management system. AutoPackage files can resolve dependencies similar to RPM and DEB.
To install an AutoPackage file, download it to your desktop and right-click on the file. Then select "Properties" and choose the Permissions tab. You will see a different screen depending on your distribution of Linux, but you should see something that says "Executable" or "Execute." Check that permission.
Close the dialog and double-click on the .package file. A dialog may pop up asking you if you want to Run or Display the file. Click Run. The install will begin and any further instructions will display in a terminal window.
Optionally, you can perform this procedure from a terminal window. Simply launch the file using a script interpreter such as SH:
FAQ :: autopackage
- 12-17-2008 #10
- Offical Debian Apt-Get HOWTO
- Slackware Package guide
- Official RPM HOWTO
- Maximum RPM (power users guide to RPM)
- Guide to Gentoo Emerge
Copyright, Re-Printing, and comments
This document is copyright Jason Lambert, 2004.
The mandrake section is contributed by jeremy1701 and is copyright jeremy1701 2004.
The Debian apt-get section was originally written by Jason Lambert and revised by antidrugue in 2006.
The .BIN/.SH, .package, and Synaptic/YaST2 sections were contributed by techieMoe.
You may not re-produce or reprint this document in part or in full without prior written permission.
If you would like to request permission to re-print any part of this document, please send Jason Lambert a private message on the forums.
The mandrake section may not be reprinted without written permission of jeremy1701
All trademarks remain the property of their owners etc.
If you have a comment about this howto, please Email Jason Lambert. Please do NOT email or send a private message asking for technical assistance. If you need help please post on the forums!
-- EOF --
Note: This message was broken into smaller, more manageable chunks and reposted by techieMoe.
Last edited by techieMoe; 03-24-2010 at 02:11 PM.