install gfortran-7 in ubuntu 22

Asked by H. A. Kumara

How to install gfortran-7 in ubuntu 22.04
I tried to install using sudo apt install gfortran-7 but it is showing unable to locate gfortran-7.
Let me know how to install

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gcc-7 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Is it Ubuntu 22.04 or Ubuntu 22.10?

Ubuntu 22 isn't a thing

Revision history for this message
H. A. Kumara (hakumarswamy96) said :
#2

Ubuntu 22.04

Thanks and regards,
*Dr. H. A. Kumara Swamy, Ph.D.*

On Wed, Apr 12, 2023 at 4:21 PM actionparsnip <
<email address hidden>> wrote:

> Your question #706184 on gcc-7 in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/gcc-7/+question/706184
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> Is it Ubuntu 22.04 or Ubuntu 22.10?
>
> Ubuntu 22 isn't a thing
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/gcc-7/+question/706184
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

gfortran-7 is obsolete (in Ubuntu releases after 21.04) and has been replaced by gfortran-10, gfortran-11, gfortran-12 and gfortran-13 (availability of these packages depends on Ubuntu release).

Revision history for this message
H. A. Kumara (hakumarswamy96) said :
#4

Thank you for the information.
My code is not running with gfortran 11. It is showing NAN but the same
code is running in gfortran 7.
Please let me know what to do.

On Wed, Apr 12, 2023 at 4:51 PM Manfred Hampl <
<email address hidden>> wrote:

> Your question #706184 on gcc-7 in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/gcc-7/+question/706184
>
> Manfred Hampl posted a new comment:
> gfortran-7 is obsolete (in Ubuntu releases after 21.04) and has been
> replaced by gfortran-10, gfortran-11, gfortran-12 and gfortran-13
> (availability of these packages depends on Ubuntu release).
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

I recommend that you change your code to make it compatible with current versions of gfortran.

Eventually it may be possible to change the behavior of the gfortran-11 version to be more similar to gfortran-7 by adding some flags (perhaps -std=f95 or -std=legacy).

Can you help with this problem?

Provide an answer of your own, or ask H. A. Kumara for more information if necessary.

To post a message you must log in.