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
200 characters left
Include your email address to get a message when this question is answered.
Submit
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!

You Might Also Like

Get Cursor Back on Laptop11 Tips & Tricks to Fix a Missing Windows Laptop Mouse Cursor
Enable Function Keys Enable Function Keys via Your Keyboard or Computer Settings
Open EXE FilesOpen EXE Files
Use Keyboard ShortcutsUse Keyboard Shortcuts
Install Two Operating Systems on One ComputerInstalling Two Operating Systems on Your PC: Dual Boot Guide
Install an Operating System on a Brand New ComputerInstall an Operating System on a Brand New Computer
Install a New Operating System on Your Computer Install a Different Operating System on a PC
Unlock a Sim Card Without a PUK CodeUnlock a Sim Card Without a PUK Code
Make a Computer Operating SystemMake a Computer Operating System
How Do I Encrypt My Samsung Phone Encrypt Your Samsung Phone
Lock Desktop Icons in PlaceLock Desktop Icons in Place
Use an Operating System from a USB StickUse an Operating System from a USB Stick
Use MS DOS Use MS DOS
Find System Specs Check PC Specs on a Computer, Phone, or Tablet
Advertisement

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

Blain Gunter
Co-authored by:
Computer Repair Specialist
This article was co-authored by Blain Gunter and by wikiHow staff writer, Nicole Levine, MFA. Blain Gunter is a Computer Repair Specialist and small business owner based in Bakersfield, California. He was first introduced to computers at the age of five and has over twenty years of experience in his field. He is both an IT consultant and computer repair technician and takes pride in his ability to troubleshoot anything. He works with hardware, software, Windows, macOS, GNU/Linux, and even vintage electronics. This article has been viewed 92,694 times.
How helpful is this?
Co-authors: 4
Updated: August 2, 2024
Views: 92,694
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?

Thanks to all authors for creating a page that has been read 92,694 times.

Is this article up to date?

Advertisement