LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-11-2005, 08:11 AM   #1
southsibling
Member
 
Registered: Jun 2003
Location: Harford County, Maryland
Distribution: Mandrake 10.1
Posts: 162

Rep: Reputation: 30
tar.gz file [free] to a good 'home'...


So, I've just downloaded this tar.gz file--into a boilerplate repository that I keep in my home folder just for downloads. Now, where does it go, to enable a good opening act?

I'm the only user on this computer, and [as I understand it] I could technically open up and install this file from anywhere I chose...for my purposes it would run. But, I read, 'put it here (/lib), put it there (/usr)', blah, blah. Trouble is, none of these dictatorials explain why. Googling can't seem to figure out what I'm asking, regardless of how I phrase it.

Here, simply, is my question. Can I open and install that package from within my home directory, and anticipate intended results. If not, why not? Why would it be more correct to move it to, say, /usr (as a for instance) before popping the cork?
 
Old 09-11-2005, 08:30 AM   #2
koen plessers
Member
 
Registered: Aug 2003
Location: Belgium
Distribution: Mint
Posts: 191

Rep: Reputation: 30
Hello

I always use /usr/loca/src. This is what Peter Norton's complete guide to Linux (copyright 2000 by Peter Norton) says about this on page 199:

"By default, system-installed files go in the /usr directory. If you are using Red Hat's rpm package, it will also install in that directory. It is a common convention that packagesyou install manually go in the /usr/local directory tree so tahat you won't accidenttally overwrite system-installed software. It is always a good idea to have clear distinction between your software and the system's software.

Please note that most tarball packages (=.tar.gz packages) will automatically install in /usr/local. You might want to make sure that the /usr/local/bin directory is in your search path."

Bye

Koen Plessers
 
Old 09-11-2005, 08:39 AM   #3
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
Technically, you could install anywhere you want, the package doesn't care about the location at all. It will be possible to install and to run the software in any place in the system, BUT (there is a "but") you may need to do some "tweaking" in order to make it to work.

When you compile a software from source ( tar.gz are usually source ), it "produces" several different type of files. Libraries files, executable files, configuration files... It makes sense, doesn't it?
Some applications will install (using the "make install" script almost all sources have... this will copy files automatically, no need to mess with it yourself) these files in a "usual" directory ( let's say /usr or /usr/local) but some other will just create a "/bin", "/sbin" (executable), "/lib" (libraries), "/etc", "/share" (configuration) in your home folder. Note that it is always possible to decide "where" it will create (or just put in the files if these directory exist, as example, if you give "/usr/, it will just put the "executable" files in /usr/bin and /usr/sbin) using the flag "--prefix=" at compile time.

If you don't give "--prefix", you might run into trouble. The problem is that Unix search for these files in a certain number of "default" directories, and /home/your_user/.../ is not a part of this. As example, the path for libraries is determined by the /etc/ld.so.conf file. If you want it to be /home/bob/download/libs (let's say... it depends on where the tar.gz will put it of course), you will have to add it to /etc/ld.so.conf.
The executable are found using the "PATH" (type echo $PATH to see it). Again, you will have to add the correct path there (there is several way to do so, the easiest on a single user machine would be to edit /etc/profile to add it to the "system wide" PATH).

In any case... if you want to keep it simple and to keep troubles to a manageable level, just compile your source in /usr/local (the "default" dir for hand-compiled stuff, usually), but keep in mind it might be anywhere else.
 
Old 09-11-2005, 08:43 AM   #4
southsibling
Member
 
Registered: Jun 2003
Location: Harford County, Maryland
Distribution: Mandrake 10.1
Posts: 162

Original Poster
Rep: Reputation: 30
Thank ya, kindly...

A very succinct and helpful answer. Odd that I've always held [Peter] Norton to be in the 'other' camp, mostly from my (distant and long forgotten) days of DOS 2.1 and Lotus 1-2-3. Would never have thought to look to him for linux advice, but there it is, clear as a bell.

Of the dozen or so linux tomes on the book shelf next to me, none had so clear an answer, and none were by Peter Norton. That will soon change. You get any points if I order from Amazon.com?

Thanks again...
 
Old 09-11-2005, 08:51 AM   #5
southsibling
Member
 
Registered: Jun 2003
Location: Harford County, Maryland
Distribution: Mandrake 10.1
Posts: 162

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Half_Elf
Technically, you could install anywhere you want, the package doesn't care about the location at all. It will be possible to install and to run the software in any place in the system, BUT (there is a "but") you may need to do some "tweaking" in order to make it to work.
I was composing a response when your answer snuck in behind me. Between the two responses, I've gotten some real 'meat & potatoes' stuff to absorb and learn. Thanks a lot for taking the time and effort. Got no excuses now. Time to get to work and crunch all this new found knowledge (and hard copy this dialog to stick in my 'linux notes' folder).
 
  


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
tar -cvzf file.xml file.tar.gz RickHunter_Ve Linux - Software 1 10-06-2004 12:58 PM
Free to Good Home jailbait LQ Suggestions & Feedback 4 08-11-2004 11:44 AM
problem unzipping a tar.bz2 file tar: Error is not recov jyome Linux - Software 4 09-04-2003 01:04 PM

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

All times are GMT -5. The time now is 07:20 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