Apr 10, 2016 The tar command on Linux is often used to create.tar.gz or.tgz archive files, also called “tarballs.” This command has a large number of options, but you just need to remember a few letters to quickly create archives with tar. The tar command can extract the resulting archives, too.
The first thing you need to do is extract the files from inside the tar archive to a folder. Let's copy the files to your desktop. You can extract an archive by right-clicking the archive file's icon inside your file browser and pressing the appropriate entry in the context menu.Extracting the archive should create a new folder with a similar name. Program-1.2.3.Now you need to open your terminal and navigate to that directory using the following command: cd /home/yourusername/Desktop/program-1.2.3Make sure you read a file called INSTALL, INSTALL.txt, README, or something similar if one was extracted. You can check if such a file exists from the terminal by using the ls command. The file can be opened and read with the command: xdg-open INSTALLWhere INSTALL is the name of your file.This file will contain the right steps to follow to continue the installation process.
Usually, the three 'classical' steps are:./configuremakesudo make installYou may also need to install some dependencies if, for example, running configure prompted you with an error listing which dependencies you are missing. You can also use checkinstall instead of make install.See hereRemember that your mileage may vary. You cannot 'install' a.tar.gz file or.tar.bz2 file.tar.gz files are gzip-compressed tarballs, compressed archives like.zip files.bz2 files are compressed with bzip2. You can extract.tar.gz files using: tar xzf file.tar.gzSimilarly you can extract.tar.bz2 files with tar xjf file.tar.bz2If you would like to see the files being extracted during unpacking, add v: tar xzvf file.tar.gzEven if you have no Internet connection, you can still use Ubuntu's package management system, just download the.deb files from. Do not forget to download dependencies too.For an easier way to install packages offline, see the question. How you compile a program from a source.
open a console. use the command cd to navigate to the correct folder. @Alvar:./configure && make && sudo make install assumes that the package uses an autoconf style of configuring and compiling programs. You should search for the files INSTALL, README or similar. Also, make install won't work if the prefix is set to a privileged location (which is the default). Therefore, use sudo make install or install it into a directory in the home directory using./configure -prefix=/yourprogram.
Then put /yourprogram/bin in your $PATH or make symlinks to it in /bin/.–Nov 19 '11 at 10:14. First things firstIt is generally not advised to download and install applications from the internet files. Most applications for Ubuntu are available through the 'Ubuntu Software Center' on your system (for example, ).
Installing from the Software Center is much more secure, much easier, and will allow the app to get updates from Ubuntu. That said, how to install tar packagesThe best way is to download the tar.bz2 and tar.gz packages to your system first.
Next is to rightclick on the file and select extract to decompress the files. Open the location of the folder you extracted and look for the Readme file and double click to open it and follow the instruction on how to install the particular package because, there could be different instruction available for the proper installation of the file which the normal routine might not be able to forestall without some errors. It is difficult to answer specifically, as each software may have a different build process, even if they are archived as a TAR/GZWhat I can say for most source codes that I know of is that you will first need to extract the tarball archive into a folder of your choice. Then most source codes rely on the AUTOCONF and MAKE programs, so you will need to use the following commands:./configuremakeTo build your binaries, and then: make installTo install it in the system.' ./configure' uses the autoconf mechanism to retrieve information on your system, and prepare the build scripts in the source file in order to build the appropriate binaries compatible with your installation.' Make' will invode the build itself, that will create the binaries out of the source code.' Make install' will then copy the binaries, documentation, configuration file, etc.
Into the appropriate folders of your system so that the software is available to the users.It is a very basic explanation, the real answer is: read the documentation provided with the source code. Only there you will know exactly how to build it. You should always try to install software from repositories whether it's official, a PPA/any other unofficial repository. That way, you'll get all stable release, security and new feature updates while you install other system updates. Another advantage is that you don't need to worry about building, dependencies and harder uninstallation (since the application won't appear in synaptic) with tar files.For example, you can install mysql by installing mysql-server package.If you really want to use tar files, the common process is to run (make install may require sudo):./configuremakemake installPlease note that some of the above commands may not be necessary, please refer to any readme files in the tar file or try to run./configure -help.