How can I install gfortran 4.6 in Ubuntu 11.04?

2

I am running Ubuntu 11.04. I wanted to install gfrotran 4.6 on my system.

Can anyone please explain (show all) steps required to install gfortran 4.6 on ubuntu 11.04?

I did the following:

sudo apt-get update
sudo apt-get install gfortran-4.6

… and got:

E: Unable to locate package gfortran-4.6

starter

Posted 2012-09-15T12:33:24.183

Reputation: 23

This package seems to exist for 11.10, not 11.04. You might need to upgrade Ubuntu or get it from somewhere else.

– slhck – 2012-09-16T16:50:29.003

Answers

1

Like slhck already mentions, it is not available for 11.04. However you can build it from source. Depending on your experience with linux this might be easy or hard but the steps you need to follow are here: http://gcc.gnu.org/wiki/InstallingGCC (gfortran is included in gcc)

for more information about building from source: https://help.ubuntu.com/community/CompilingEasyHowTo

Gerhard Burger

Posted 2012-09-15T12:33:24.183

Reputation: 377