Downloading internet .tar.bz2 file from linux ubuntu

Hello,

I would like to download a .tar.bz2 file found in a website into linux ubuntu.  I can download it to my PC, but I would not know how to move it from windows directory to linux directory in the virtual machine.  Is there a command? The file is called
pwiz-bin-linux-x86_64-gcc48-release-3_0_11567.tar.bz2 and it is found at http://proteowizard.sourceforge.net/downloads.shtml
sunseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
The easy way is to get into your VM, on the command line + download the file directly into your VM filespace using wget or curl.

And... You really shouldn't try + install gcc via using a tarball. Gives me the willies just thinking about the problems likely to arise.

This will cause you a world of grief, as likely many dependencies will be missing, which may or may not be apparent, which will likely cause gcc to fail or worse, produce executables that fail.

The correct way to install gcc is via your Distro's package manager, so Ubuntu uses apt-get which will install gcc + all dependencies.

Also, gcc4 is very old. For you to be able to run gcc4 executables which actually work, in all cases, looks like you'll have to install Trusty 14.04, which is highly hackable via PHP (so don't install PHP).

You're far better off starting with Zesty or Artful (if you don't mind networking changing to use netplan) + starting using the default gcc6.

For code to work in all cases you require both your compile time + runtime - libraries + header files + libc + gcc to match.

Trying to use gcc48 on a non-gcc4 machine, may produce hard to debug compile or runtime problems.
0
sunseAuthor Commented:
I will use wget, but I do not know how to write the command to download the file from the web site.
0
AlanConsultantCommented:
Hi Sunse,

wget URL

Open in new window


So, for example:

wget https://sourceforge.net/projects/proteowizard/files/proteowizard/Archived%20releases/2.0.1905/pwiz-bin-linux-x86_64-gcc42-release-2_0_1905.tar.bz2

Open in new window


However, I concur with David - I would install gcc from the Ubuntu repos:

sudo apt-get install gcc

Open in new window



Hope that helps,

Alan.
1
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
I remember back in my days working at IBM, where I had to build gcc from scratch.

Take Alan + my suggestion...

sudo apt-get install gcc

Open in new window


is your friend.
0
sunseAuthor Commented:
I was thinking that since I have an internet installed in Linux, may be I can download the file to a directory in Linux and then install.  But I would like  to know how to install issuing the command from the Linux terminal.  Which method is better you think?

Thanks a lot

cd ~/Downloads/
mdir pwiz/
mv pwiz-bin-linux-x86_64-gcc48-release-3_0_11537.tar.bz2 pwiz/
cd pwiz/
tar xvjf pwiz-bin-linux-x86_64-gcc48-release-3_0_11537.tar.bz2
0
sunseAuthor Commented:
So, should I run the gcc command first nd the wget afterwards?  What is gcc for?
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
This question, "So, should I run the gcc command first nd the wget afterwards?  What is gcc for?" is unclear.

You must download gcc before you can use gcc.

Unsure what nd might mean.

If you don't know that gcc provides, please update your question with why you think you require installing gcc... specifically what problem you're trying to resolve.
0
serialbandCommented:
I think the nd is a typo of and.

You don't need to run both.  You only need to do one or the other.  gcc is the Gnu C Compiler used by programmers to convert source code to programs that run on a computer.

sudo apt-get install gcc  will install the "default" version of gcc on your version of Ubuntu.  This will be your simplest bet.

You can also install it manually by downloading pwiz-bin-linux-x86_64-gcc48-release-3_0_11537.tar.bz2 pwiz and extracting gcc48, but you will need to understand how to run the make command and possibly alter the configuration to manually install it on your system.

You should pick one.  You don't need to do both.  The apt-get install gcc command is much easier to do.
1
arnoldCommented:
Responding only to the question of order of wget versus GCc, the two are not exclusive and it is possible to get both at the same time through use of multiple terminals.imho, getting the file would potentially be faster, and then getting the GCc app. Generally the Same amount of time will be consumed waiting for all three steps to complete before you would be able to move to the next step
Step get the tar.bz2
Step get GCc installed
Step uncompress/untar the downloaded item in one  bzip2 -cd downloaded_file.tar.bz2 | tar -xf -       Or you can bzip2 -d file.tar.bz2 and then tar -xf file.tar in two steps

Make sure to read the README and INSTALL when present.....
There might be other requirements that need to be added, installed that are not bundled into the GCc package.
0
sunseAuthor Commented:
So, to download and install source code, I have to download the compiler, antra or anzip the file and the compile the source code?
0
arnoldCommented:
Consider you are downloading a package that has "Assembly Required." GCC, automake, autoconf, etc, are the tools you need to assemble.

,
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
serialbandCommented:
Yes. You'll need to unbzip and untar the source code files, then compile it.

Just do the apt-get install gcc and it's done.
0
sunseAuthor Commented:
How do I know whether file contains sourced code or binaries with compiled code?
By the way,  thanks to all for your answers.
0
AlanConsultantCommented:
Hi Sunse,

Please can you help us understand what it is that you are trying to achieve here?

There *appears* to be little reason to download the bz2 file and attempt to set it up from source, when you can issue one single command (sudo apt-get install gcc) that will do it all in one go.

If you aren't even sure what gcc does, then what do you need it for at all?

Thanks,

Alan.
0
sunseAuthor Commented:
I am trying to understand whether the file is source code or binaries.  In the first case I would have to compile in the second I will not have to compile.  I have sometimes downloaded things using wget, I have never used gcc, I want to make sure that I am doing the right thing with the right file.
0
sunseAuthor Commented:
sudo apt-get install gcc and the name of the file?
0
AlanConsultantCommented:
Hi Sunse,

In the general case, wherever you are downloading from will usually tell you specifically what it is you are downloading, and if you have to compile, and how to compile.


Alan.
0
sunseAuthor Commented:
Thanks.
0
AlanConsultantCommented:
Hi Sunse,

This is the complete command (nothing to add to the end):

sudo apt-get install gcc

Open in new window



Alan.
0
serialbandCommented:
Source code tends to be all text.  If you downloaded the source code, then you will see a makefile or maybe a makefile.in template with a configure file.

If you have the binary, the general place for it is in the bin folder.  Check if you have a file named gcc.  If it exists, run file gcc and it should tell you what basic file type it is.
0
arnoldCommented:
Commonly, tar.gz or tar.bz2 are archives of source.
Compiled usually come in packages rpm for redhat/centos  not sure Debian, .dpkg.....


When downloading it also commonly indicates what is being downloaded, source or ....
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.