Thank you Damian. Tried the first suggestion. It said I already had
gfortran; it turned out to be version 13. Tried the second suggestion. My
system has not heard of git. Managed to find gcc-14.2.0.tar so I am now
struggling to do something with that.
On Tue, 20 Aug 2024, Damian Rouson wrote:
Date: Tue, 20 Aug 2024 23:34:50 +0000
From: Damian Rouson <damian@archaeologic.codes>
To: John Harper <john.har...@vuw.ac.nz>
Cc: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: Installing gfortran-14
Resent-Date: Wed, 21 Aug 2024 11:35:39 +1200 (NZST)
Resent-From: <john.har...@vuw.ac.nz>
You don't often get email from damian@archaeologic.codes. Learn why this is
important<https://aka.ms/LearnAboutSenderIdentification>
It has been a few years since I used Ubuntu. If I recall correctly, I think you
can just use
sudo apt install gcc
and that will install gcc, g++, and gfortran. My Linux knowledge is limited.
I never figured out how to install a specific version of GCC on Ubuntu so I
think you just get what you get. However, what I liked about Ubuntu was that
it seemed to be aggressive about installing more up-to-date versions of GCC
than some other Linux distributions, so if it's an option, you might get a
newer version of GCC by updating your Ubuntu kernel and then the above apt
command again. I think the latest version is Ubuntu 24. FWIW, I mostly used
the Lubuntu lightweight Ubuntu distribution.
If you really need GCC 14 and the above advice doesn't help, you might try
running the OpenCoarrays installer script to build whatever version you want
from source:
git clone https://github.com/sourceryinstitute/opencoarrays
cd opencoarrays
./install.sh --package gcc --install-version 14 --install-prefix
<installation-path> --num-threads 4
or run ./install.sh. --help for additional options or shorter versions of the
above options.
I hope this is all helpful.
Damian
On Tue, Aug 20, 2024 at 4:08 PM John Harper
<john.har...@vuw.ac.nz<mailto:john.har...@vuw.ac.nz>> wrote:
I did this in my Ubuntu 22.04 system with no trouble:
(lf) john:~$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
but the next step failed:
(lf) john:~$ sudo apt install gfortran-14
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package gfortran-14 is not available, but is referred to by another
package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gfortran-14' has no installation candidate
(lf) john:~$
What should I have done?
-- John Harper, School of Mathematics and Statistics
Victoria Univ. of Wellington, PO Box 600, Wellington 6140, New Zealand.
e-mail john.har...@vuw.ac.nz<mailto:john.har...@vuw.ac.nz>
-- John Harper, School of Mathematics and Statistics
Victoria Univ. of Wellington, PO Box 600, Wellington 6140, New Zealand.
e-mail john.har...@vuw.ac.nz