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..??.. |
Just to get the extract working, try the following:
Code:
tar -xjvf gcc-4.8.0.tar.bz2 |
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 Why don't you just install a compiler using your package manager (after the upgrade to a supported version of Fedora, which is recommended)? |
Quote:
Quote:
Quote:
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. |
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” |
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) |
This page will help you upgrade to a newer Fedora release: https://fedoraproject.org/wiki/Upgrading
|
upgrade & 'Development Tools'
My questions have been answered.
Thank you. jwsmith |
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 |
All times are GMT -5. The time now is 02:42 AM. |