Compiling in /usr/local/src
I have read somewhere that I should compile in /usr/local/src but I've had some success in compiling in my /root directory. Will some programs just not compile anywhere else?
|
Re: Compiling in /usr/local/src
Quote:
Does your statement "I've had some success in compiling in my /root directory" mean you are compiling as root, or did you mean you are compiling in the root of your user's home directory? You do not have to be root to compile anything, except a kernel if you are compiling in /usr/src, and even then you should be su'd to root, not actually logged in as root. |
For applications you download yourself as additions to your system, the suggested place (I believe) to download and compile them is /usr/local/src. That will place all the files in the appropriate places in the /usr/local tree. That doesn't mean that you're not allowed to compile things in other places, and, as Sargek said above, sometimes the suggested place is somewhere else, like /usr/src for the kernel or maybe even ~/src for your own code. I suppose technically you could put anything in any directory and then just put a lot of work into making sure everything can find all its required libraries and such, but it helps organize your system to follow the directory structure.
|
Quote:
Code:
./configure --prefix=/your install path |
It doesn't make any difference where you compile source code. I tend to use /usr/local/src, I keep tarballs in /usr/local/src/Arc and I put compiled packages in /usr/local/src/Packages (in case I need to reinstall something). But it doesn't matter. You can compile anywhere.
Quote:
Quote:
|
Quote:
|
Quote:
The majority of packages install in /usr/local, so unless you want to install somewhere else, you don't need a prefix. Where you compile the src is irrelevant. |
Never thought about that, just assumed it worked that way since I've always done it in /usr/local/src. Either way, I still like to put things in the directory where they seem to logically belong, but whatever makes most sense to the person who's doing the compiling... Linux is all about flexibility.
|
Quote:
|
usr
Quote:
|
Quote:
|
All times are GMT -5. The time now is 12:10 PM. |