Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-29-2015, 07:05 PM   #1
Registered: Mar 2014
Posts: 444

Rep: Reputation: Disabled
Want to update GCC and Gfortran as a result

$ gfortran --version
GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
How can I upgrade gcc?

I've tried a few tricks, none worked so far.

Thanks, - Alex

Last edited by AlexBB; 03-29-2015 at 07:15 PM.
Old 03-29-2015, 07:37 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Generally, I recommend not replacing the system compilers since much of the software on your system depends on them. Instead, compile and install a newer version in an alternate directory (e.g. /usr/local/gcc-4.9) and set your PATH and LD_LIBRARY_PATH environment variables to point to the newer version.
1 members found this post helpful.
Old 03-29-2015, 08:00 PM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
@AlexBB, you are using an oldish OS.

Install Ubuntu 14.04.2 : The default gcc is version 4.8.2 .

Or build your update : See post #2 >>> E.g. /usr/local/gcc49/.

../gcc-4.9.2/configure --prefix=/usr/local/gcc49 --program-suffix=49 --enable-languages=c,c++,fortran --enable-shared --with-system-zlib

1 members found this post helpful.
Old 03-31-2015, 01:50 PM   #4
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
btmiller, thank you very much. knudfl, I guess I should follow your sensible advice. I do have a Ubuntu 14.04.02 64 bit on a disk but my present OS is 12.04 32 bit. What's going to happen if I put this 64 bit OS in the disk drive and begin the install. Is it OK?

Thank you, - Alex


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
[SOLVED] Do I have gcc & gfortran installed? AlexBB Linux - Newbie 5 03-30-2014 07:14 PM
gcc and gfortran fereshteh Linux - General 22 07-29-2013 12:26 PM
run gcc gfortran Blink0 Slackware 9 04-19-2012 08:56 PM
problem in installing gcc-gfortran 4.3.3 Kilam orez Linux - Newbie 12 06-29-2011 01:20 AM
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 06:39 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:23 PM.

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