LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-03-2015, 04:16 PM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,020

Rep: Reputation: Disabled
Post Installing program from source.


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

Thank you.
 
Old 07-03-2015, 05:00 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

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


/usr/local/src/ : Is never used. ( For anything.)
 
Old 07-03-2015, 07:48 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,981

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
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
 
Old 07-03-2015, 09:20 PM   #4
Ranamon
Member
 
Registered: Feb 2013
Location: Land of Hopenchange
Distribution: Slackware
Posts: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by hack3rcon View Post
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.
 
Old 07-04-2015, 01:03 AM   #5
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,020

Original Poster
Rep: Reputation: Disabled
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" ?
 
Old 07-04-2015, 02:28 AM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,981

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
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
 
Old 07-04-2015, 03:02 AM   #7
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 12.04/14.04, Scientific Linux 6.3/6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,799

Rep: Reputation: 157Reputation: 157
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)...
 
Old 07-04-2015, 06:36 AM   #8
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,020

Original Poster
Rep: Reputation: Disabled
So, What is the purpose of "src" directory?
 
Old 07-04-2015, 11:18 AM   #9
mralk3
Member
 
Registered: May 2015
Posts: 773

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally Posted by hack3rcon View Post
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

Last edited by mralk3; 07-04-2015 at 09:01 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
list the steps for installing a program from source code kenholtmeyer Linux - Newbie 12 08-14-2011 10:40 PM
open source dvd/cd copy program? burning on the fly program? vieya Linux - Software 3 12-14-2009 10:16 PM
Installing from source, installing from CVS and the E-17 window manager... Buffbannana049 Ubuntu 10 02-15-2006 12:27 AM
looking for an open source program that can... Eugene Programming 6 11-13-2003 03:53 AM


All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration