Results 1 to 10 of 12
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Apr 2003
- London, UK
HOWTO - Install Software [README]
For the benifit of people new to Linux, I have written a generic explaination of howto install software in Linux. Note that some software may have specific installation proceedures, this HOWTO is not a substitute for reading the offical 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
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 "Compiling and installing software from source" section, as well as the section specifically for your GNU/Linux Distribution. Do not worry if you dont understand or remember everything written here straight away, book mark this page and use it as a reference page later on.
Compiling and Installing software from source
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.
For organisational purposes, I like to save my source zip file to /usr/local/src/, but this is totally up to you. For the rest of this section we will assume you have downloaded your zip file to /usr/local/src/. If you do not have a /usr/local/src directory, you can create it with the following "mkdir" (make directory) command:
Change to the /usr/local/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:
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 perminent 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.
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).
Installing using Debian apt-get
Apt-Get is a wonderful package management system for Debian GNU/Linux. Apt-Get, like RPM make installing and managing installed software easy, and once again has the same disadvantages that binaries are pre-built and cannot really be fine tuned to your system very well. I really like Apt-Get becuase of its automatic software download and upgrade mechanisms, and unlike Redhat doesnt keep trying to sell you something, and doesnt try to limit your use of the system.
The most powerful feature of apt-get surely is that you dont manually have to find & download the software you want to install, apt-get will do this for you, and also resolve any software dependencies. Before you can use apt-get for the first time, you must do a small bit of configuration.
You need to edit your /etc/apt/sources.list file, to specify the locations of Debian packages. You will proberly want your default sources.list file to look something like this:
deb http://http.us.debian.org/debian stable main contrib non-free deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb http://security.debian.org stable/updates main contrib non-free
deb http://ftp.debian.org/debian/ sid main contrib deb http://non-us.debian.org/debian-non-US sid/non-US contrib deb http://security.debian.org/ stable/updates main
Once you have confirmed your sources.list file, we need to update our local list of packages that are available for installation. To do this, use the following command after logging in as the root user:
apt-get install <program>
apt-cache search <something>Code:
apt-cache search irc
To uninstall software is fairly straight forward also.
apt-get remove <application>
A word of caution: If you try to remove a piece of software that other pieces of software depend on, apt-get will also want to un-install those other pieces of software as well. Becareful you dont end up uninstalling your entire system!. apt-get will prompt you before removing any additional packages so watch carefully!
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 http://easyurpmi.zarb.org 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?
Here's couple of places to get more info (these are the places where I got my references):
Some site in Texas
Installing with fedora / yum
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:
Installing software using Gentoo EMerge
- 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.
You may not re-produce or reprint this document in part or in full without my prior written permission..
If you would like to request permission to re-print any part of this document, please send me 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 Me. Please do NOT email me or send me a private message asking for technical assistance. If you need help please post on the forums!
-- EOF --
- Join Date
- Oct 2004
Thanks for the guide, helped me understand what was happening when compiling source. Is there a utility that lists which packages are installed by hand for suse?
Originally Posted by jadurantCode:
- Join Date
- Apr 2003
- London, UK
if there is a specific package you want to know if its installed, do:
rpm -qa | grep -i <NAME>
- Join Date
- Oct 2004
to make this more complete maybe you can add how-to install from src.rpm files using rpmbuild.
- Join Date
- Jul 2004
Would be helpful if this tutorial provided a brief overview of the most common places that program files are installed to. My problem is that I don't know where I should be putting all the programs I install, /usr/bin sounds good for most things but I don't like throwing more crap into a folder full of crap, so mostly I end up installing to ~/bin. Also some dependency information would be helpful, like what happens when you install something as root as compared to what may happen if you install the package under a regular user account.
- Join Date
- Nov 2004
It was ver thorogh informative and to the poit. Being a newbe it clarified a lot. However I am a fedora user I would have loved to know more about yum.
Re: Great work!Originally Posted by agustr
- Join Date
- Dec 2004
Very nice How-To. I remember when I couldn't find anything like that, because everything else I found made what to do very confusing, and all the different ways just made it super confusing as a reader.
- Join Date
- Dec 2004
Very helpful !
I have searched for those "How-to" a lot, but never found something this simple.
- Join Date
- Jan 2005
- New Zealand
Re: HOWTO - Install Software [README]Originally Posted by jasonlambert
A search on the site found:
Hope this helps.
Happy New Year!