PDF download Download Article PDF download Download Article

Do you need to install a Linux program from a TGZ file? A TGZ file is an archive (like a ZIP file) that contains compressed files, so you'll need to extract those files before you can install the program. While this might sound complicated, it's easy to do, even if you're not comfortable at the command line. This wikiHow tutorial will guide you through compiling and installing a program on Ubuntu, Debian, Kali, and any other flavor of Linux from a TGZ file.

TGZ Linux Installation: Quick Steps

  1. Open the TGZ file in Terminal from your file manager.
  2. Unpack the file with the command "tar -xzvf filename.tgz".
  3. Enter the new directory from the unpacked TGZ file.
  4. Look through the instructions in the README or INSTALL files.
  5. Run the configure script in the file's directory.
  6. Type in "sudo make install" to finish installing your file.
1

Enter the directory that contains your TGZ file.

PDF download Download Article
  1. Just navigate to the TGZ file in your file manager, right-click an empty space in the folder, and then select Open in Terminal . [1]
    • You can also use the cd command in a Terminal window to enter the directory. For example, if the TGZ file is on your Desktop, you'd use cd Desktop to enter that directory.
    • While installing software from a TGZ isn't difficult or uncommon, it's usually faster and easier to install software using a package manager .
  2. Advertisement
2

Unpack the TGZ file.

PDF download Download Article
  1. Replace filename with the name of your own file. This extracts the files from the TGZ file to the current directory. [2]
    • Run ls -a to view the files in the current directory. You should now see a new directory that contains the files you've just extracted.
    • Some tar files come in a non-gzip format, and unzipping them with these arguments could give an error. In that case, run the command tar xf filename.tar .
4

View the README or INSTALL file.

PDF download Download Article
  1. This file contains specific instructions for compiling and installing the program. You'll want to read the contents of this file so you know about any installation requirements or quirks. There are a few ways you can read the contents of the file:
    • To view the whole file at once, use cat README .
    • If the file is several pages long, it'll be easier to use more README to read the file one page at a time. Just press the down arrow or the spacebar to move through the pages.
    • If the README or INSTALL file instructs you to make changes to a particular file, you can do so by editing the file using nano or vim .
5

Run the configure script.

PDF download Download Article
  1. If there is a configure script, run ./configure . The configure script prepares the software for your particular computer and creates a Makefile. [4]
    • If the configure script throws an error due to a missing dependency, you'll need to install the missing dependencies before you'll be able to compile and install the program. You can install the missing dependencies easily using a package manager like Synaptic, apt-get, or dpkg .
    • If there is no configure script, double-check the README or INSTALL file. You may have to run a script that has a different name, such as install.sh . Before running that script, make it executable using chmod u+x install.sh . Then, run it by typing ./install.sh .
  2. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about troubleshooting computers and printers, check out our in-depth interview with Blain Gunter .

      About This Article

      Article Summary X

      1. Extract the files from the TGZ.
      2. Enter the new directory.
      3. View the README or INSTALL file.
      4. Run ./configure and resolve any missing dependencies.
      5. Run "make" and then "make install."

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 89,801 times.

      Is this article up to date?

      Advertisement