art's abode

Doing a rootless ./configure; make; make install

without comments

Often I want to compile something for my normal user account. In these cases, it doesn’t make sense to install system-wide. Lots of source tarballs nowadays allow you to compile and install a program in a particular location.

In general, you should be doing something like so:

$ tar -jxvf some_fantastic_warez.tar.bz2

$ cd some_fantastic_warez
$ ./configure ––prefix=~/usr

$ make

$ make install

make install will place your compiled binary into the path you specified with the ––prefix option when running configure. In this case I’ve set it to install it under the directory tree ~/usr (i.e., /home/username/usr).

If the source is fairly standard, you will then find the binary as ~/usr/bin/some_fantastic_warez.

You may wish to read about modifying your $PATH, so that you don’t need to specify the full path to run your program.

Written by art

November 6th, 2007 at 11:32 pm

Posted in shell,source-code

Leave a Reply