LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-28-2003, 01:13 AM   #1
DartMol
LQ Newbie
 
Registered: Mar 2003
Posts: 11

Rep: Reputation: 0
Talking How do you install *.tar.gz packages?


I'm having problems installing *.tar.gz, *.tar.Z, and *.zip packages.

How are these supposed to be installed? I need information regarding the correct installation path, correct installation tools, etc.

Additional information would greatly help-- especially tips.

By the way, I'm just new to Linux and I use Slackware.

Thanks!
 
Old 03-28-2003, 01:52 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The only tool you need is a command line.

tar -xzvf filename
./configure
make
su
make install

If you have any problems, you'll need to check the scripts and see if you can edit anything - such as your libraries being in a weird place when the script expects them somewhere else, but that's rare and you should be okay in Slack.

Of course, you may not have the libraries and whatnot needed, but then just download them and start the process over again. Good luck.

- Sorry. Dain bramage. Somebody in a thread I was just reading was using Slack. Duh.

Last edited by slakmagik; 03-28-2003 at 01:58 AM.
 
Old 03-28-2003, 01:56 AM   #3
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
man tar

Seriously, it will help you out ALOT. If that doesn't do it for you, check out the following:

http://www.linuxquestions.org/questi...threadid=45094

It's a really good thread on installing from source. BTW, any package that ends with .tgz is a package designed for Slackware and they are also known as Slackpacks. Oh, and I've yet to see a *.zip file in Linux, so I can't tell you anything about them. Hope this helps you out.
 
Old 03-28-2003, 08:49 AM   #4
mhearn
Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
man tar is hopeless, but that's ok, cos you only need to remember the magic letters xzvf (change s to a j if the file is a .tar.bz2 instead of a .tar.gz).

cd then into the directory just created. the do as shown above, (configure, make, make insatll)
 
Old 03-28-2003, 10:00 AM   #5
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Rep: Reputation: 45
Quote:
Originally posted by mhearn
man tar is hopeless, but that's ok, cos you only need to remember the magic letters xzvf (change s to a j if the file is a .tar.bz2 instead of a .tar.gz).

cd then into the directory just created. the do as shown above, (configure, make, make insatll)
Just so the newbies don't get confused, that should be change the x to a j if the file is tar.bz2 instead of tar.gz

 
Old 03-28-2003, 11:17 AM   #6
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
Quote:
Originally posted by tcaptain
Just so the newbies don't get confused, that should be change the x to a j if the file is tar.bz2 instead of tar.gz

This is precisely why you need to read the man page. The "x" is for
extract, which is always needed if you are extracting data from a
tarball.
If you have a file that has been gziped and would like to gunzip it,
you use the "z" option. For differing versions of tar, the bzip2
option is either "y" or "j".
READ THE MAN PAGE!!!
 
Old 03-28-2003, 11:20 AM   #7
mrg
LQ Newbie
 
Registered: Mar 2003
Distribution: Mandrake 9, Debian
Posts: 2

Rep: Reputation: 0
Troubleshooting?

Excellent advice!

Now could someone please discuss the best methods of dealing with missing libraries.

I'm trying to install a package that complained that libz was missing when I did ./configure, fair enough, I installed the zlib package and then it can't find zlib.h (I think, I'm not at my computer right now) which I'm pretty sure is included in the zlib package I installed.

So would be very grateful if someone would explain how to deal with situations like these in general terms. How do I find the libs if they are on my system? How do I tell configure where to find them, symlinks? command line options? edit the configure script?

I'm using Mandrake 9.

Please be gentle, I am quite new to Linux...
 
Old 03-28-2003, 12:11 PM   #8
newbieME
Member
 
Registered: Mar 2003
Location: BC Canada
Distribution: Slack Niner ;)
Posts: 185

Rep: Reputation: 30
you are most likely having problems installing because of missing dependencies... make sure you have all the progs that the application you are trying to install requires.....i usually download from freshmeat.net and they list all the dependencies for the softwares...

usually configure scripts are best left alone since they will make sure that the software you are trying to install will run without fail all the time....but IF YOU REALLY KNOW WHAT YOU ARE DOING or a risk taker (like me)...then i guess you could always change the configure script and remake it using autoconf command...
 
Old 03-28-2003, 12:17 PM   #9
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Rep: Reputation: 45
mrg: Another bit of advice about the dependencies is that when you compile from source, check to see if you have the development packages for those dependencies...

For example, if a certain app needs the XDelta libraries or something...make sure you also have the XDelta-devel package installed or it will say "not found" when you configure...

This isn't ALWAYS the case...but whenever I try and compile something and it says it can't find something I KNOW is installed, the first thing I check is if I have the -devel package installed. Usually that's it...

The second thing I check is ld.so.conf in /etc for the paths to the libraries (just google around for more on that)

Another tip....sometimes ./configure --help or -h will give you some interesting info.
 
Old 03-28-2003, 02:35 PM   #10
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
Did someone say man tar?
 
Old 03-29-2003, 05:41 AM   #11
DartMol
LQ Newbie
 
Registered: Mar 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Talking

Ok. That helped a lot. Where (in what directory) should the package be in the first place before extraction?
 
Old 03-29-2003, 06:05 AM   #12
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I think most people do /usr/local/src but I have ~/lab - like a laboratory where I experiment and blow stuff up.
 
Old 03-29-2003, 06:15 AM   #13
DartMol
LQ Newbie
 
Registered: Mar 2003
Posts: 11

Original Poster
Rep: Reputation: 0
If you store the package in /usr/local/src, won't it extract the package in that directory (e.g. /usr/local/src/package_name)?

Also, does it mean that I can install any package in any directory?

Somebody told me that /usr/local is already near to obsolete. Is that true?
 
Old 03-29-2003, 06:17 AM   #14
wr3ck3d
Member
 
Registered: Dec 2002
Location: IL
Distribution: NetBSD, Slackware, Gentoo, Debian, FreeBSD
Posts: 444

Rep: Reputation: 31
a laboratory, lol.

This what I do....I download the file into my ~/dlds folder. Then i go into my /usr/src and run the tar command

tar -zxf /home/me/file.tar.gz
cd file
less INSTALL,README,etc
etc
etc

About the install part. There are two kinds of installs (that i know off). First is just a regular where the binaries go into the binary folder/s, the man pages go into the man pages folder/s, etc. To uninstall the program you go back into the source directory and run a 'make uninstall' (That is IF that program has that). If not you can just run a 'make install' again and look where everything went a manually delete it.

Then there is a directory install where everything goes into one folder. To uninstall the program you just delete the folder.

Most times its the first one, but you can choose a directory install every time (again, that was a "i think") by doing.
./configure --prefix=/where/you/want/it

Last edited by wr3ck3d; 03-29-2003 at 06:30 AM.
 
Old 03-29-2003, 06:21 AM   #15
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
*g*

Yeah - you can delete the zip and keep the source if you're going to do some hacking or delete the source and keep the zip if you need room - or delete both or keep both.

I'm not sure what you mean by install any package in any directory. You can put the tar.gz anywhere and the scripts will send the stuff to their places. And you can change that by modifying the scripts, but there's generally no reason to.

I think maybe you *are* supposed to use /opt or something but /usr/local's still by far the most common thing. I'm not sure if /usr/local meets the File System Hierarchy specs or not.
 
  


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
can not install the tar(gz,bz2) packages tuzhiyong Linux - General 2 11-23-2004 05:23 PM
install/upgrade packages using tar.gz as opposed to RPM's nishmal Linux - Newbie 2 06-10-2004 11:20 AM
How to install packages with tar.gz extensions? SelaAragon Linux - Software 6 03-16-2004 12:27 AM
Uninstalling tar.gz packages david911 Linux - Software 3 10-17-2003 06:09 AM
Can I automate the tar, ./configure, make, and make install of about 50 packages? JoeLinux Linux - General 2 04-13-2002 03:35 AM


All times are GMT -5. The time now is 03:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration