LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2008, 05:42 PM   #1
imacf90
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
how to i install tar.bz2?


today is the first day ive ever used linux, im using ubuntu. installing things is a bit confusing for me, i need help. thanks
 
Old 04-01-2008, 05:57 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
tar -xvfj yourfile.tar.bz2

FYI, bz2 mean the bzip2 compression method was used . See
man bzip2

If gzip had been used, the filename would look like
file.tar.gz or file.tgz
and the extract cmd
tar -zxvf file.tar.gz
or
tar -zxvf file.tgz

man tar
man gzip


you do need to be in the dir where the file exists and own it to extract it. It should create a dir under there with the extracted contents.

You'll find these useful:
http://www.tldp.org/LDP/abs/html/
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://linux.oneandoneis2.org/LNW.htm
http://rute.2038bug.com/index.html.gz

Last edited by chrism01; 04-01-2008 at 05:58 PM.
 
Old 04-01-2008, 06:00 PM   #3
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
to break it down:

file.tar.bz2...

file is the file name - doesn't tell us much
tar - this is a tar archive ("man tar" in a terminal window for more info)
bz2 - this file uses bzip2 compression (kinda like a zip file in windows or a stuffit file on a mac)

fyi: the shorthand version of this same file would be file.tbz2. That said, the extension doesn't matter with most linux apps, so it could just as easily be file.bkRulz & all the following would still apply.

to unarchive/uncompress this file, open a terminal window & do the following (in a terminal):

bunzip2 file.tar.bz2

this will uncompress the bzip2 & leave you with a tar archive called "file.tar"

to unarchive the tar, in the terminal:

tar xvf file.tar

-- or --

you can do it all at once by telling tar this is a bzip2 archive, like so:

tar xvjpf file.tar.bz2

for more info, read "man tar".

if you're unsure of any file, in a terminal, type

file whatever_file.ext

and you can see what type of file you're dealing with.

edit: I knew someone would be me to the answer, but after all this typing, I'm leaving it here.

Last edited by BrianK; 04-01-2008 at 06:03 PM.
 
Old 04-01-2008, 06:12 PM   #4
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Rep: Reputation: 36
Hello, and welcome!
First of all. You must know, that there are several methods to install software under linux.
Method #1: use the package manager. There are several package managers, but let's stick with Synaptic.
Method #2: using a tarball (tar.bz2 or tar.gz). Only use this method, if you couldn't find the software you need with the package manager, or you just need a newer version or you want to experiment. This method takes more time and it is unnecessary to install anything this way, if there is already a binary package available (.deb).
To answer the question in the title:
#1.: unpack the tarball
#2.: search for the text file "INSTALL" or "README" in the unpacked folder
#3.: read instructions
#4.: do what instructions say

To be more specific, the following commands are needed to install a tarball (install package from source).
./configure
make
make install

This works almost every time, but you may encounter some packages, where this method doesn't work. In this case follow steps #1 to #4 listed above.
You must also know, that it is strongly advisable to type
./configure --help
before ./configure because this way you will be able to see all the possible fine-tune options for that particular package.
Good luck!

P.S.: next time please use the search function of the forums before asking a question, since this question already was discussed several times before. Thanks.

Last edited by pusrob; 04-01-2008 at 06:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I install a *.tar.gz or a *.tar.bz2 file? SkinnerC Slackware 11 12-13-2007 10:03 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
can not install the tar(gz,bz2) packages tuzhiyong Linux - General 2 11-23-2004 05:23 PM
how to install tar.bz2? Fear58 Linux - Software 1 06-20-2004 07:20 PM
How to install .tar.bz2? daYz Slackware 10 11-14-2003 01:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration