Operating Systems > Linux and UNIX
Heeelp this Linux noob with tar files:(
jtpenrod:
quote: I am a little embarrassed to admit it, but i am totally out at sea with installing from tar files, what with tarred executables and tarred source, .tgz files and what have you.
--- End quote ---
It ain't so hard. Once you download one, check out the extension. This will be:
*.tar.gz - This indicates a tar archive that's been compressed with gzip. Sometimes this will be shortened to: *.tgz
In that case use: tar xvzf WhatEver.tgz
Or: tar xvzf WhatEver.tar.gz
A .bz2 extension means that bzip2 was used. For these, the command is: tar xvjf WhatEver.tar.bz2
This will undo the compression and extract the archive. What I do is I've created a special directory called Install-Programs in my home directory just for this purpose. That's where I drop the "tarball" and unload it. Once you've done that, cd to your install directory. Since I keep this a clean directory, I know where everything is. If the writers of the tarball did any sort of decent job, there should be a couple of files called "README" and "INSTALL" (all caps). These contain the instructions on how you should proceed, whether you need to run something like:
./configure (Note: Unless the install directory is in your path, you need to use the ./ in order for BASH to find it. If you just try "configure", you'll probably get a "bad command" or "command not found" error.) Sometimes you can just type in "make" at the command prompt in order to compile the executable. make is really quite a versatile program that can also do the install, and perform any post-install clean up that may be required. Once you've verified that everything is working OK, you should remove any left over files from the install directory (keep it clean). Some can be discarded, but I'd keep the original tar archive and store it somewhere else. You never know when you might need it again.
Naturally, this may seem strange if you are coming from Winders. It really isn't so bad. The best thing to do is go ahead and give it a try. No better teacher than experience.
voidmain:
And for those newbies who are confused when they can't run a program that resides in their current directory just by typing it's name, you *can* make it so you do not have to type the "./" to run the program. Just add "." to your PATH in your ~/.bashrc. Then when you change into a directory that has an executable it will be in your path as "." is the "current working directory". Now, this is turned off for a reason. It is a security risk for trojans if "." is in your path (if you have more than one user that uses your system). And since UNIX thinks about security first they do not add "." to your path. If you need me to explain how this can be a security risk I can do that in a later post. But if you wanted to add it just edit your ~/.bashrc file and add this:
PATH=$PATH:.
export PATH
Navigation
[0] Message Index
[*] Previous page
Go to full version