LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 11-20-2011, 09:28 AM   #1
kawaikx15
LQ Newbie
 
Registered: Nov 2011
Posts: 13

Rep: Reputation: Disabled
best directory to install programs/external libraries


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..

Also I would like to know how to set the enviornmental variables in Fedora 16?

Also I want to know where is the user's profile file located and how to edit it? will any editor do?


kindly help
 
Old 11-20-2011, 10:05 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by kawaikx15 View Post
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.
 
1 members found this post helpful.
Old 11-21-2011, 02:14 AM   #3
kawaikx15
LQ Newbie
 
Registered: Nov 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
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?
 
Old 11-21-2011, 08:32 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by kawaikx15 View Post
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.
 
Old 11-21-2011, 12:09 PM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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.
 
Old 11-21-2011, 03:41 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
I let the thing go where the software manager puts it.
 
  


Reply



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
What is the correct directory to install my programs? jdruin Linux - Newbie 3 01-04-2009 05:58 PM
Best directory to install programs? rkthornton Linux - Software 6 02-25-2005 05:55 PM
What directory do I install new programs jkruer01 Linux - Newbie 1 04-05-2004 07:11 PM
Install programs to which directory? sonofdbn Slackware 2 03-07-2004 08:58 AM
What is the proper directory to install libraries/dependecies of Gnome/Anjuta? jdruin Linux - Software 0 12-05-2003 01:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:05 PM.

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
Open Source Consulting | Domain Registration