How to install a program published as a tar.gz file?

38,358

Solution 1

To install one usually only needs a few commands. After downloading and placing the tar in the directory you wish to install it in (I use my home dir as it is easy) follow the steps by opening a terminal and making sure you are in your home by typing

ls

This will show the files in the directory and you should also see pcmonitor.tar.gz listed

Next you want to unpack pcmonitor.tar.gz with

tar xzvf pcmonitor.tar.gz

This will create a directory named pcmonitor. Check for it by using ls. Now you want to run install do this with

sudo ./install

The sudo is because the installation needs root privledges. From here the installation should take over. Hope this helps.

P.S. It is note worthy to state that this install is not the usual

tar xvzf *.tar.gz
cd *
./configure [options]
make
sudo make install

that works for many other tarballs you may download in the future.

Solution 2

There are two common approaches to install a software/package in Ubuntu:

  1. Search for the software package you are looking in the Ubuntu Software Center, if you find the package in Ubuntu Software Center then all you need to do is click the Install button (it needs working Internet connection) and you are done!

  2. Extract the tar.gz and follow the steps as shown here. If your downloaded file contains .deb extension use the command dpkg -i package.deb or simply open it with Synaptic Package Manager.

Share:
38,358

Related videos on Youtube

user117598
Author by

user117598

Updated on September 18, 2022

Comments

  • user117598
    user117598 over 1 year

    I'm trying to download and install software for my Ubuntu Linux machine. I've downloaded it by wget or the download link and so I get this tar.gz file. After that, I extracted it and saved it to my desktop. What's the next step? How do I install this kind of software?

    • Uri Herrera
      Uri Herrera over 11 years
      1.Have you searched for whatever software you want in the Ubuntu repositories?/2.Have you searched for a PPA/3.Software distributed in source (tar file) often have instructions how to install or run the software.
    • Uri Herrera
      Uri Herrera over 11 years
    • user117598
      user117598 over 11 years
      I try that, it didnt work
    • Uri Herrera
      Uri Herrera over 11 years
      There is a readme inside, have you read it?, what errors do you have?, why do you say it doesn't work?, what doesn't work?.
    • Uri Herrera
      Uri Herrera over 11 years
      I have download the software, and I have opened the tar file. It has a README file, it contains instructions, which happens to be the same as the duplicate question. Follow them.
  • Andrea Corbellini
    Andrea Corbellini over 11 years
    I would put more emphasis on the importance of using the Software Center: many people use to manually download and install software, sometimes creating serious conflicts between distribution packages and third-party software.
  • fIwJlxSzApHEZIl
    fIwJlxSzApHEZIl over 6 years
    what happens if there is no install file or build commands? just a pre-compiled binary with associated subfolders.