LinuxQuestions.org
Register a domain and help support LQ
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 03-29-2015, 08:05 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

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


Code:
$ 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 08:15 PM.
 
Old 03-29-2015, 08:37 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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, 09:00 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
@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, 02:50 PM   #4
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

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
 
  


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
[SOLVED] Do I have gcc & gfortran installed? AlexBB Linux - Newbie 5 03-30-2014 08:14 PM
gcc and gfortran fereshteh Linux - General 22 07-29-2013 01:26 PM
run gcc gfortran Blink0 Slackware 9 04-19-2012 09:56 PM
problem in installing gcc-gfortran 4.3.3 Kilam orez Linux - Newbie 12 06-29-2011 02: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 07:39 AM


All times are GMT -5. The time now is 06:28 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration