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> 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 >