LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing program from source. (https://www.linuxquestions.org/questions/linux-newbie-8/installing-program-from-source-4175547169/)

hack3rcon 07-03-2015 03:16 PM

Installing program from source.
 
Hello.
For Installing program from source "/usr/local" is good or "/usr/local/src" ?

Thank you.

knudfl 07-03-2015 04:00 PM

No <options> : Programs will often by default install to /usr/local/.


/usr/local/src/ : Is never used. ( For anything.)

John VV 07-03-2015 06:48 PM

if you are not going to provide any information !
there is not much we can do .

is it a "autotools" build ?

is it a "cmake" build ?

is it a "q-make" build ?

is it a "Makefile" build ?



for a Autotools build

read the configure "help" output
Code:

./configure --help

-------- the default location is likely the debian stile "/usr/local"
-------- for a RPM based distro use

./configure --prefix=/usr


Ranamon 07-03-2015 08:20 PM

Quote:

Originally Posted by hack3rcon (Post 5386841)
Hello.
For Installing program from source "/usr/local" is good or "/usr/local/src" ?

Thank you.

Not enough information. Is this a snapshot you're getting off CVS or GIT? For that, I usually make a directory to receive the download. Once it's compiled and whipped into shape, then just run "make distcheck" on it and store the tar file (where ever you find that convenient).

Self written apps go into /usr/local for debug versions and testing. Once satisfied, I'll recompile, use the optimization flags, and drop it in /usr. That way, I know where the production runs are, and where the debug versions are.

hack3rcon 07-04-2015 12:03 AM

No, It just a program from source code. For example, You want to install pidgin from source code. The better place is ".../src/" or ".../local" ?

John VV 07-04-2015 01:28 AM

Quote:

For example, You want to install pidgin from source code. The better place is ".../src/" or ".../local" ?
nether but maybe /usr/local

BUT

it REALLY depends on your operating system and HOW !!! YOU !!! set it up

i build a LOT of programs but i keep them OUT!!!! of the default OS directory tree

i use a second tree for all the programs i build
( this way if i FUBAR the OS i can reinstall the os EASILY )

so is set my build path to "/DATA/SUSE "
Code:

./configure --prefix=/DATA/SUSE
this then causes "make install" to install it to
/DATA/SUSE/bin
/DATA/SUSE/lib64
/DATA/SUSE/include
/DATA/SUSE/share

some people like where Libreoffice installs
/opt/LibreOffice

some LIKE to use the "local"
this dates back to server / terminal of the 70's ,80's and early 90's
where the local directory WAS on your desk and "/" was on a server someplace


use what you want
but you might WANT to stay consistent and use that ALL the time

JaseP 07-04-2015 02:02 AM

If you want to be technical about it,... If you are installing programs manually, you should probably be installing them to /opt ... The /opt directory is supposed to be the place where software that is not part of the OS's standard installation is supposed to be done...

Then again,... nobody keeps to standards anymore (or never really did, for that matter)...

hack3rcon 07-04-2015 05:36 AM

So, What is the purpose of "src" directory?

mralk3 07-04-2015 10:18 AM

Quote:

Originally Posted by hack3rcon (Post 5387051)
So, What is the purpose of "src" directory?

Use that one command, man.

Code:

man hier
Quote:

/usr/src
Source files for different parts of the system, included with some packages for reference purposes. Don't work here with your own projects, as files below
That same man page has all the relevant information you have been asking for.

EDIT: cleaned up text


All times are GMT -5. The time now is 10:31 AM.