best directory to install programs/external libraries
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just installed Fedora 16 and I am very new to Linux. I have to install following programs and libraries:
1. gcc
2. cmake
3. SDL
4. Allegro
I know where to download their source codes from. What I don't know is where to unzip and build them up..
Unless you're doing something very specific, I'd not install from source unless it's necessary. You should be able to install most of those programs via your online repositories, using yum. "yum install gcc", "yum install cmake", etc. should get it all done with no need to compile. And there is no 'best' directory to do it.
Quote:
Also I would like to know how to set the enviornmental variables in Fedora 16?
Depends on your shell. Usually is bash, so "export variable=setting", like "export DISPLAY=0.0".
Quote:
Also I want to know where is the user's profile file located and how to edit it? will any editor do?
Users profiles are in the users home directory, and yes, any editor will do.
In case of building a program from a source, does it matter where you unpack the source code? I mean suppose I unpack the source code in some subdirectory of my home directory, and now run ./configure make and make install in sequence. where would the program would actually be installed? My dilemma arises because I just moved from windows to linux. In windows, we install all programs in a folder 'program files' no matter where you save the downloaded installation file. Here I find it bit confusing in linux. does linux gives option where to install? or is it so that as a user I can download and install programs in my home directory? if this true, how do I add the PATH to headers, libraries, executables etc?
In case of building a program from a source, does it matter where you unpack the source code? I mean suppose I unpack the source code in some subdirectory of my home directory, and now run ./configure make and make install in sequence. where would the program would actually be installed?
Where you unpack the source is immaterial. And where it will be installed is wherever the "make install" rules in the makefile tell it to go. Each program is different, and installs in a different place.
Quote:
My dilemma arises because I just moved from windows to linux. In windows, we install all programs in a folder 'program files' no matter where you save the downloaded installation file. Here I find it bit confusing in linux. does linux gives option where to install? or is it so that as a user I can download and install programs in my home directory? if this true, how do I add the PATH to headers, libraries, executables etc?
You *CAN* install programs in your home directory, but it's not recommended. And again, each program is different...some won't care if they're installed in your home, some won't work right unless they've got their own subdir somewhere else. SOME programs will give you the choice...some won't.
Modifying your path is easy...just open your .profile or .bashrc file (they're in your home directory), and append whatever you want to the PATH variable that's already there. Libraries are more confusing, since you'll have to deal with ldconf and other such things. Also, it's best to install software via package whenever possible, from your online repositories first, THEN via package, and if none of those work, compile from source. Unless you need a VERY specific option in the software that's not present in the pre-built version, it's not worth the time and effort to compile it.
And Linux is only 'confusing' right now...because you're learning. What you're saying is confusing is actually something you're not used to having in Windows. And that is CHOICE and FREEDOM to use your computer, the way YOU want to use it.
When you install from the Fedora repository, which you should always do if they've got the program you want, the installation tool will do all the work for you. When you install from source, which you very seldom need to do, the program will contain instructions for Make to tell it where to put each component. Few programs can be relocated without altering them.
Where things end up, is all over the place! The actual program usually goes in /usr/bin, other stuff in /usr/share, any library files in /usr/lib, documentation in /usr/doc, etc. With Windows, each program has to come with everything it needs, so you may end up with several versions or copies of the same dll file. With Linux, the libraries are supplied by the distributor, so they are all kept together. That practice has extended to keeping everything in a classified arrangement.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.