Libervis Network - For a Free WorldLibervis Projects | Nuxified Projects
Welcome guest. Register | Login | Show what's new
Inatux.com

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.

libervisco's picture

Nice writeup.Another thing

Nice 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 install step 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.

free-zombie's picture

sudo make install only

sudo make install only works on distroes with sudo. If it doesn't, use su -c 'make install'.

tbuitenh's picture

sudon't

free-zombie wrote:

sudo make install only works on distroes with sudo. If it doesn't, use su -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...

a thing's picture

GNU Source Installer

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><br><p><img><br><b><i>
  • You may quote other posts using [quote] tags.
  • You can use BBCode tags in the text. URLs will automatically be converted to links.
  • Textual smileys will be replaced with graphical ones.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 5 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

We have 7822 members who wrote 2145 articles and 12193 comments. Welcome to our newest member, kneeskloro!

Who's online

There are currently 0 users and 31 guests online.
Nuxified RSS feed