Installing and Updating Programs from Source

Matt Graham mhgraham at crow202.org
Thu Jan 25 09:00:26 MST 2018


On 2018-01-24 16:59, Andrew McRobb wrote:
>> Is there a specific subfolder I should be installing compiled 
>> programs
>> to? IE /opt instead of /usr/bin ?

Things that are compiled from source are usually put in /usr/local , 
because your distro's package manager will leave that directory and its 
subdirectories alone.  /opt is usually for binary packages like Android 
Studio or Orrible.

>> Is there a way to specify the subfolder?
> If you mean by downloading it, most cases only where you put the
> source code. Unless you mean the installation part, most of the time
> no

What?  Everything that's built with autotools (which is almost every 
project that's larger than a toy) has the --prefix= option.  This 
defaults to /usr/local/ but you can set it to anything you like.  You'd 
set it to /usr/ to install the stuff alongside all the system packages.  
Well-behaved packages put their binaries in $PREFIX/bin , libraries in 
$PREFIX/lib , documentation in $PREFIX/share/doc , etcetera.

> But even then if you are hell bent on where your program
> lives, you can use symlinks.

If your program depends on libraries, and those libraries are installed 
in a non-standard place, you may need to add that place to 
/etc/ld.so.conf and rerun ldconfig before the program will run.

-- 
Crow202 Blog: http://crow202.org/wordpress
There is no Darkness in Eternity
But only Light too dim for us to see.


More information about the PLUG-discuss mailing list