LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Want to update GCC and Gfortran as a result (https://www.linuxquestions.org/questions/linux-newbie-8/want-to-update-gcc-and-gfortran-as-a-result-4175538192/)

AlexBB 03-29-2015 07:05 PM

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

btmiller 03-29-2015 07:37 PM

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.

knudfl 03-29-2015 08:00 PM

@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


-

AlexBB 03-31-2015 01:50 PM

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


All times are GMT -5. The time now is 12:47 AM.