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.

1

Enter the directory that contains your TGZ file.

  1. An easy way to do this is to do so through your file explorer. Just navigate to the TGZ file in your file explorer, right-click an empty space in the folder, and then select Open in Terminal.
    • 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
4

View the README or INSTALL file.

  1. In most cases, you'll find a text file called README or INSTALL. 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.

  1. Look for a file called configure in the new directory. If there is a configure script, run ./configure. The configure script prepares the software for your particular computer and creates a Makefile.[2]
    • 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

About This Article

Nicole Levine, MFA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 29,270 times.
How helpful is this?
Co-authors: 3
Updated: May 30, 2022
Views: 29,270
Categories: Operating Systems
Article SummaryX

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?
Advertisement