Initial information
Many newly arrived users worldwide Linux are faced with this problem when want to install certain software that does not come by default in the distribution and used to download the file, find one. tar.gz Throughout this article I will show how there nothing complicated this task.
- Package type. Tar.gz or. Tar.bz2 contains the sources of the program ready for compilation (turn sources into executable).
- Its installation does not depend on the distribution used.
- The. Means that tar inside this file there are other files and sub-folders and.Gz or .Bz2 is the type of compression that was used to create the package.
Putting your hands dirty
For practical example we install the latest version of Mplayer , video player using enough in the world of free software. If your distribution already have the program installed by default, no problem, install it again for the purpose of learning. Create a directory inside your user folder (/home/user_login). For didactic reasons, I will hereafter refer to this directory whenever a /home/user. Download the file (in this case is the type. tar.bz2) and save it in /home/user
Now that the fun begins ... Open a terminal window (the one small window generally black background used to execute commands) and enter the following commands in this order: $ cd /home/user (in the directory containing the package) $ ls (just for you to see the package you downloaded) $tar -jxvf nameofpkg.tar.bz2 TIP: Enter the first few letters and hit tab. Explanation of the last command:. to extract files from a tar.bz2 package uses the . command listed above, if it were a tar.gz command would be quite similar: $tar -zxvf nameofpkg.tar.gz That is, change only one letter "j" to "z" or vice versa. I recommend you try to find out what each of these letters, for this use the command: $man tar Now you may notice that a new directory was created: $ ls $cd nameofpkgs $ls You see a file called "configure"? Explanation follows below. As the name suggests, this file 'prepares' the Linux to install the program, checking dependencies, among other things. If you encounter problems in the next step, read the INSTALL or README, they inform everything you need to have and / or do to have the program running smoothly. $./configure (the / means that we want to execute this file.) NOTE: Now environment variables and library dependencies are checked. This step takes a while, if you find any error set, write it down, check the install and see if it says something about. $make $make install (installs the program on Linux) Quick List of commands:
- tar-zxvf-name filename.tar.gz - unpacks the file extension tar.gz,.
- tar-jxvf-name arquivo.tar.bz2 - Unwrapping tar.bz2 file extension..
Finishing
In some packages do not even need to run the trio configure-make-make install, because when unpacking with tar inside the folder is now all ready to run executable or else there is a file in its own installation program, as is the case of OpenOffice. Try installing it to realize what I'm talking about. Well folks, this is my first article here at Viva Linux , I hope I have helped you in some way.
Till next.
Till next.
Mehdi Hashemi
1 comment:
Good bt short article. In addition I can suggest you visit here wikiext.com/tgz Here mostly full info about this files
Post a Comment