LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2013, 05:37 PM   #1
jwsmith
LQ Newbie
 
Registered: Jan 2012
Location: Berkeley, CA
Distribution: rh fedora 18
Posts: 26

Rep: Reputation: Disabled
extracting .bz2 and .gz files


My Fedora 16 didn't come with gcc or gdb ... I want to learn ANSI C
I downloaded the compiler and debugger into my downloads directory as:
gcc-4.8.0.tar.bz2
gdb-7.6.tar.gz

I created new directories in /user/local --- gcc --- gdb
Then I moved gcc-4.8.0.tar.bz2 over to my directory /user/local/gcc
Then I placed myself in /user/local/gcc (where gcc-4.8.0.tar.bz2 is present) ---and issued this command:

$ tar -xjv gcc-4.8.0.tar.bz2
and the cursor dropped a line and "hung" with no text or result
until I entered ^C and was returned to the Command Prompt

QUESTION:
a) What's wrong with my command format?
b) Will 'tar' and the same switches work for the filename ending in .gz
c) When these files "unwrap" will I have a ready-to-go compiler?
OR--will I be given source-code that I will have to 'build'
and compile..??...and How would I do THAT, since I don't have
a compiler..??..

Last edited by jwsmith; 05-03-2013 at 05:43 PM.
 
Old 05-03-2013, 05:42 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Just to get the extract working, try the following:
Code:
tar -xjvf gcc-4.8.0.tar.bz2
tar -xzvf gdb-7.6.tar.gz
You should be able to install those from the Fedora repositories - I'm not a Fedora user though so that's just my assumption.
 
Old 05-03-2013, 05:43 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873
If you want to untar a file you have to use the -f option, in your case
Code:
tar -xjvf gcc-4.8.0.tar.bz2
The problem here is that you will end up with the source code for the compiler, for which you would need a compiler to get it running.

Why don't you just install a compiler using your package manager (after the upgrade to a supported version of Fedora, which is recommended)?
 
Old 05-03-2013, 06:07 PM   #4
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,533

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by gilead View Post
You should be able to install those from the Fedora repositories
Quote:
Originally Posted by TobiSGD View Post
Why don't you just install a compiler using your package manager
+1 to the above two comments. Use the package manager!

Quote:
Originally Posted by TobiSGD View Post
after the upgrade to a supported version of Fedora, which is recommended
And another +1 to this. Fedora 16 stopped being supported as of 2013-02-12 and hence receives no security updates.

As a final side note, to extract compressed tar packages like this in the future you could just issue 'tar xf packagename'. The 'v' option is just to show a list of files as they extract (it isn't needed) and neither 'j' nor 'z' is required unless you are extracting through a pipe (GNU tar will just work out the right compressor for you). Finally you don't need any '-' unless you start to use more complex options.

P.S. I know I didn't really need to comment on this last part as the extraction commands you received from the others will work but it is a pet peeve of mine that everyone insists on using old (and now redundant) extraction options and making things appear more complex than they need be. Modern, maintained, implementations of tar (e.g. the GNU and BSD versions) just don't need all these options for a simple extraction. 'xf' (extract, file) and you are done.

Last edited by ruario; 05-03-2013 at 06:17 PM. Reason: Added the P.S.; added a comment about old distro
 
Old 05-03-2013, 06:12 PM   #5
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
Fedora 16 reached its "end of life" back in February. It is obsolete and completely unsupported.

Once you have upgraded to a supported Fedora (17 or newer) you should consider using "yum groupinstall" to install gcc and other essential development tools:

Code:
yum groupinstall “Development Tools”
 
Old 05-03-2013, 06:12 PM   #6
jwsmith
LQ Newbie
 
Registered: Jan 2012
Location: Berkeley, CA
Distribution: rh fedora 18
Posts: 26

Original Poster
Rep: Reputation: Disabled
Mechanics of upgrade

Gilead and TobiSGD...thank you both

I saw the 'f' switch ion my "Mark Sobell" ref. book but was unsure what it would do.

I'm very new to LINUX

Can I upgrade from within Fedora-16?
Otherwise, what are the mechanics of upgrading an existing OS?
(When I leave this screen I will be looking at the desktop to see if an "upgrade" icon exists)
 
Old 05-03-2013, 06:18 PM   #7
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
This page will help you upgrade to a newer Fedora release: https://fedoraproject.org/wiki/Upgrading
 
Old 05-03-2013, 06:39 PM   #8
jwsmith
LQ Newbie
 
Registered: Jan 2012
Location: Berkeley, CA
Distribution: rh fedora 18
Posts: 26

Original Poster
Rep: Reputation: Disabled
upgrade & 'Development Tools'

My questions have been answered.
Thank you.
jwsmith
 
Old 05-04-2013, 02:58 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,531

Rep: Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622
the old fedora 16 used "preupgrade" .That never worked well
Starting in Fedora 18 they are using "Fedup" .A very different system


going from fedora 16 to 18 will almost never work -- it might but with problems

doing a NEW clean install ( reformatting the drive to ext4, the default for fedora ) is the best way to upgrade fedora
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
extracting files...installing files.....from *.tar.bz2 and *ipk vinodhkumarvk Linux - Newbie 19 02-27-2013 03:29 AM
extracting .tar.bz2.gz file need help elsheepo Linux - Software 1 03-09-2008 01:03 AM
noob in need of help extracting bz2 file roddyguk Linux - Software 2 01-31-2006 06:00 PM
extracting tar.bz2.gz files crank Linux - Newbie 5 04-19-2004 12:33 AM
extracting .bz2 files mjkramer Linux - Newbie 4 10-16-2003 10:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:43 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