14

I am trying to install gfortran in my computer with Ubuntu 12.04 by using these commands,

sudo -i
apt-get update
apt-get install gfortran

but I found the program saying "unable to locate package gfortran". Then on a Ubuntu page I found some question regarding the same problem and I went through the solution from them but again I couldn't install the gfortran package.

Can anybody tell me how to install it?

  • Take a look at This. – Mitch Oct 14 '13 at 12:16
  • Do you get any error while running apt-get update? Can you provide the contents of /etc/apt/sources.list? – Salem Oct 14 '13 at 12:47
20

Using sudo apt-get install gfortran should install the latest version of gfortran available for your system. Madison has a list of all versions available for all supported versions.

  • I couldn't get the commands you gave to work, but since you wrote this gfortran4.8 has come out. The command that worked for me was just "sudo apt-get install gfortran". But that was after I added gcc and other things. – AlanSE Nov 2 '14 at 13:42
  • How to install 4.8? – ChillarAnand Feb 14 '16 at 13:53
  • @ChillarAnand just install gfortran package. – Braiam Feb 14 '16 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.