installing from source
This was written as a reply to a question, but I figured it didn't answer the question... It's a useful explanation though...
Compiling source usually goes like this:
(optional) verify the download is error-free:
md5sum blah.tgz
compare the result to a file that usually is named MD5SUMS, which can be downloaded in the same place as the archive.
unpack the archive:
tar xvzf blah.tgz
or
tar xvzf blah.tar.gz
or
tar xvjf blah.tar.bz2
note the j instead of z in the last one
go into the directory that was created, usually:
cd blah
(usually, but not always) configure the source code:
./configure
or if you have special wishes:
./configure --help | less
./configure --option-you-just-read-about --another-option
compile:
make
if the compilation was successful (if it wasn't, that will be obvious by the last few lines before the return or the prompt), install:
sudo make install
Note not all packages can do make uninstall, and you can't use the package manager to uninstall software that was installed this way. Often it's a good idea to give ./configure the option --prefix=/opt/blah , so you can uninstall by deleting the directory /opt/blah . The downside is that software installed in /opt may not show up in menus.










Comments
Nice writeup.Another thing
by libervisco | Thu, 2007-01-18 13:27Nice writeup.
Another thing I like to use when compiling from source on a distro that has either of the RPM, APT or TGZ package management is use checkinstall instead of the last
make installstep in order to create a package for that distro and then install from that package. Then it is easily managed by the given distro's package manager making uninstalling easier.I've written a tip on that earlier in the old tips thread: http://www.nuxified.org/topic/tip_collection#comment-809
Edit: For those who may be wondering, checkinstall is available in Ubuntu repositories (universe I think) and should probably be available in other popular Debian-based and RPM-based distros. There is a Slackware TGZ package for it as well. So, you don't need to compile checkinstall itself before being able to use it for compiling other stuff you would be installing with it.
sudo make install only
by free-zombie | Thu, 2007-01-18 14:03sudo make installonly works on distroes with sudo. If it doesn't, usesu -c 'make install'.sudon't
by tbuitenh | Thu, 2007-01-18 15:05sudo make installonly works on distroes with sudo. If it doesn't, usesu -c 'make install'.... and it won't work on my computer, because I configured sudo to accept only a few commands, and make install is not one of them. I was trying to answer an ubuntu question...
GNU Source Installer
by a thing | Thu, 2007-01-18 16:00Nice tool to automate it all.