Install tar.gz Ubuntu
If we are using Ubuntu Linux, we will later or sooner find ourselves faced with the operation in which we need to install a tar.gz file. In this article, we will discuss how to install a tar.gz file on the latest Ubuntu versions.
Introduction to tar.gz File
Tar can be defined as a software utility in computing to collect several files into a single archive file. Often, it is known as a tarball and used for backup and distribution objectives. The term tar is considered through (t)ape (ar)chive. Usually, a tar archive includes the .tar file suffix that is package.tar.bz2, package.tar.bz, package.tar.xz, or package.tar. Also, the word tarball is used for referring to the tar file.
A file containing an extension, i.e., tar.gz can be described as an archive file. It means that this file includes single or multiple files in it which can be compressed into one archive file. Various tar.gz files are the same as the ZIP files.
Essentially, not all the tar.gz files that we trigger on Ubuntu include an installable application. Many tar.gz files could be used for several other types of objectives like storing a group of documents. Then, do not assume that only because we have a tar.gz, we can install its software.
It is worth noting as well that sometimes applications are packaged into many files using extensions that are the same as the tar.gz (however, not identical).
Some key points are discussed as follows:
How to install tar.gz files in Ubuntu?
There is no one way for installing the tar.gz file in Ubuntu because the data in a tar.gz file could take various different formats. There are instead several methods we should consider.
We will explain all the methods below, beginning with the easiest methods to install a tar.gz file.
Using a Debian package rather
The easiest method for installing a tar.gz file in Ubuntu is not to install these files at all. However, rather than installing an application, we wish with the help of a file of the Debian package.
Debian packages (file names end with .deb)are another method of packaging various applications for Linux Ubuntu and the same operating systems. It is preferable for installing an application with the help of the Debian package rather than a tar.gz file, for some reasons:
Therefore, before going to start installing our tar.gz file, check if we can use a Debian package rather. First, find the Ubuntu Software Center. If the application is not available there, then check the official website of the application to check if it provides a Debian package to download.
Once we have downloaded a Debian package, then we need to right-click on the application and choose an option, i.e., "Open with Software Center" for installing it from the Software Center. Also, we can install the application using the terminal with the dpkg command.
See tar.gz for instructions on the installation
Our next step is to see the tar.gz file to check if it contains instructions about how to install an application. We can do it by opening an Archive Manager application in Ubuntu. Also, this application is sometimes known as File Roller, and we can execute it from the terminal by entering the file-roller if we can not find any graphical launcher.
For instance, here's what we will see if we download a tar.gz installation package (which only happens to be a program to create and open tar.gz files).
We will notice it includes a file which is known as INSTALL. It provides detailed instructions of installation for an application if we open this file. If there is no such file with a term such as INSTALL, then look for a file, i.e., README instead. Installing an application in such a case is as efficient as below the instructions.
The steps for installation of the tar.gz files could vary widely relying on what type of code we are dealing with. Though, in most cases, we will need to implement two common steps before we can pursue any other instructions of installation.
Use Make for installing the application
Sometimes, we will find the tar.gz file that includes source code, no installation instructions. In such a case, we can try executing generic commands, i.e., Make installation. Typically, source code is aimed to be compiled for Ubuntu and installed with a program known as Make. Hence, there is an opportunity that whoever made a tar.gz file aimed for it to be installed by Make, even when it does not come with instructions.
First, ensure that we have already extracted a tar.gz file and installed a build-essential package for installing by Make. Open the command-line window and enter the command, i.e., cd for navigating to the folder in which the extracted data of the tar.gz file is stored.
For instance, if we extracted the tar.gz file data to any folder on our desktop named "my file", we would execute the following command:
From here, enter the following:
The above command will configure the source code. Thus, it could be compiled on our system. We may be prompted a few questions about how we wish to create the application, or we may not, relying on what type of source code is created to do.
Enter the following:
It will compile source code. It can take time for the process to finish if we are dealing with any large application.
Run the following command finally:
The above command will copy the code that we compiled in Ubuntu so that we can run it.
Again, do not expect it to work for all tar.gz files we may wish to install. However, it is the process we can expect to pursue in general.
If it fails...
If we have tried everything and still can not get our tar.gz file, then we suggest checking online guidance tailored to our application.
Also, remember that installing applications using the tar.gz file in Ubuntu or other Oses is not exactly a task of beginners. It is complicated and subject to several variables that it could be an irritating procedure even for many experienced users.
Now, the Ubuntu ecosystem is fortunately so rich that including installing various software using tar.gz is rare now these days. Almost every application that executes in Ubuntu has existed as Debian packages. However, when we do trigger any tar.gz file in Ubuntu, then the guidance which is compiled as above with a bit of luck, will give what we need to install it.