0

I need to install a .tgz in a Debian distro.

3
  • The question is unclear. Are you trying to install a program from source, or something else? If so, look at the install instructions. If something else, please specify. Commented Mar 29, 2014 at 14:44
  • Most likely is a tarball with the sources, but some of them include binaries. Depending the software you want to install, depends the method.
    – Braiam
    Commented Mar 29, 2014 at 14:48
  • 1
    Please explain what tgz you want to "install". Translated to the Windows world, you are now asking "How do I install a .zip? Unless you explain _what_ is in this .tgz` we can't really answer.
    – terdon
    Commented Mar 29, 2014 at 15:32

2 Answers 2

2

There is no single way to 'install a .tgz file.' The .tgz format is just a compressed archive format (at tar archive that has been compressed with gzip) and can essentially contain anything.

You can extract a .tgz file with the following command:

tar -xvzf file.tgz

If this contains software, usually there will be some text file inside with instructions on how to install. INSTALL or README are common names. Of course everything depends on where you got the .tgz file from. Some distributions use this format for their packages - you should not try to install packages from one of these distributions on Debian. It is also common to distribute source code in this format, in which case you will have to compile the code before you install it. If you are a beginner you should look for a binary package for the software first rather than attempting to compile the source code.

If you want more help, then you should update with more information about the software you are trying to install.

0

Source packages for linux are commonly structured with autotools and using them follows a common pattern. An easy way to tell is by looking at the INSTALL file inside, which will have instructions much like these.

First you need to open the package up:

tar -xzf foobar-1.2.3.gz

Should construct a directory foobar-1.2.3. You can now cd foobar-1.2.3 and look to see if there is an INSTALL file and a configure script, indicative of autotools.

./configure --help

This will list various configure options you can use.

./configure

This will check for dependencies, etc., and produce a Makefile.

make

Will run the default make target, which is probably what you want.

make test

May or may not do anything. You can also try make check.

make install

Will install the package into /usr/local by default. You can change this via the --prefix argument to ./configure.

2
  • This is good general advice with what to with a .tgz source bundle, but I fear the OP is missing the very basics of installing software on Linux. Sending him/her down the road of compiling software if it is available in the Debian repositories isn't very helpful! Plus they will likely need to install the build tools anyway.
    – Graeme
    Commented Mar 29, 2014 at 22:01
  • @Graeme OTOH, it is a potentially simple question with a potentially straightforward answer. I don't doubt the OP is missing all kinds of basics, but it is up to him or her to ask more specific and detailed questions. "The road of compiling software" is not going to cause any death or dismemberment at this point in time, and if s/he runs into problems w/ missing tools, at least s/he is one step closer to figuring out what questions to ask. Viewed negatively: some people need to learn the hard way. Viewed positively: some people just need to be pointed in the right general direction.
    – goldilocks
    Commented Mar 29, 2014 at 22:37

Not the answer you're looking for? Browse other questions tagged .