Install tar.gz packages with a install.sh file in Kubuntu

Posted by Flo in Tricks on November 17th, 2008.
Tags: , , ,

Installing tar.gz packages with a install.sh file in it isn’t the hardest thing to do when using Kubuntu, but if you always use deb packages, like me, it can take a while before you have found a way to install them. When you have found out how it works, you have a chance to run into a little permission problem that probably only occurs when using Kubuntu. So here’s my guide for unexperienced users how you DO install these packages in Kubuntu.

First of all, I assume that you have all the applications installed that come with the standard Kubuntu Hardy release.

To install the package, you first need to extract it. You can do this either manually with "Ark" (right click on it, extract here) or with in a command shell. In the last case, you can just follow the guide. If you extract it first, you can skip step 3.

  1. Open a root command shell. (Alt+F2, type "Konsole" and press "OK". Now go to Session (upper left corner) and select "new root-shell". You need to enter your password after that.)

    If you are wondering why you should use the root terminal, and not the regular one: a normal user in Kubuntu does not have all permissions. For example, if you try to install the Opera webbrowser (the deb package didn’t seem to work), it will return the error that you don’t have the permission to write in the /etc/ map. So if you want to be sure that it works, use the root shell, it saves you doing everything twice.
     

  2. Now go to the folder that contains your tar.gz file using:

    cd path/to/your/folder/foldername/

    If you don’t exactly know where you’ve downloaded your file, some useful commands can be:

    dir                                  // shows the local folder’s contents.
    cd foldername                // opens the foldername folder.
    cd ..                               // you go up one folder (the reverse of cd foldername).

     

  3. Now extract the tar.gz file (if you didn’t have done it already using ark) using:

    tar xvzf nameofthefile.tar.gz
     

  4. Open the folder in which you’ve extracted the tar.gz file and which contains the install.sh file:

    cd nameoftheextractedfolder

    If the name of the folder is very long or complex, here’s a tip: use the graphical interface to browse to the file, right click it, press "rename". When the whole name is selected, press "ctrl+c" to copy it. Now go to your command shell, and paste the name with "shift+insert". Saves you some typing but I don’t know if it’s the fastest way.
     

  5.  To install the file, simply use the following command:

    sh install.sh
     
    If everything works, you see some lines flashing by and there might be some questions you need to answer during the installation.
     

  6.  If nothing strange happens, everything is installed and you can find your application in the menu. Enjoy!

NOTE: Notice how everything may go wrong if you forget to use the root shell. You will get some errors after the "sh install.sh" command if the installer tries to install files in folders with restricted access, and your installation will fail.





Leave a Reply

*