Instale versão antiga do gfortran

1

Estou usando o Ubuntu 16.04.2 LTS e quero instalar o gfortran version 5.3 . Quando eu uso qualquer uma das entradas abaixo de gfortran 5.4 está instalada, o que não é compatível com o programa que estou tentando executar.

sudo apt-get install gfortran
apt-get install csh gfortran

Estou tentando executar o software de mecânica quântica GAMESS, que, até onde eu sei, precisa de modificações específicas para cada compilador. Quando tento instalar o GAMESS com o gfortran 5.4, recebo uma saída dizendo unrecognized version of gfortran . Eu olhei para o código e a versão mais recente é 5.3.

Como eu poderia instalar o antigo gfortran version 5.3 ? Além disso, algo como o seguinte trabalho para excluir a versão 5.4 para que não haja conflitos? Obrigado!

sudo apt-get remove --auto-remove gfortran

Para esclarecimento, não sei por que o gamess não aceitará versões após o 5.3, mas recebo muitos erros para concluir a instilação com a versão 5.4. Além disso, quando eu digito apt-cache policy gfortran , recebo a seguinte saída:

gfortran:
Installed: 4:5.3.1-1ubuntu1
Candidate: 4:5.3.1-1ubuntu1
Version table:
*** 4:5.3.1-1ubuntu1 500
    500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
    100 /var/lib/dpkg/status
    
por DWK 31.07.2017 / 18:45

1 resposta

0

Ubuntu 16.04 LTS

Você pode tentar usar a opção -std descrita no manual

man gfortan

   -std=std
       Specify the standard to which the program is expected to conform,
       which may be one of f95, f2003, f2008, gnu, or legacy.  The default
       value for std is gnu, which specifies a superset of the Fortran 95
       standard that includes all of the extensions supported by GNU
       Fortran, although warnings will be given for obsolete extensions
       not recommended for use in new code.  The legacy value is
       equivalent but without the warnings for obsolete extensions, and
       may be useful for old non-standard programs.  The f95, f2003 and
       f2008 values specify strict conformance to the Fortran 95, Fortran
       2003 and Fortran 2008 standards, respectively; errors are given for
       all extensions beyond the relevant language standard, and warnings
       are given for the Fortran 77 features that are permitted but
       obsolescent in later standards. -std=f2008ts allows the Fortran
       2008 standard including the additions of the Technical
       Specification (TS) 29113 on Further Interoperability of Fortran
       with C and TS 18508 on Additional Parallel Features in Fortran.

Ubuntu 14.04 LTS

O Ubuntu 14.04.1 LTS tem suporte a longo prazo por 5 anos, até abril de 2019. Eu testei em um sistema live persistente criado a partir do arquivo iso ubuntu-14.04.1-desktop-amd64.iso com mkusb .

Quando instalei o gfortran neste sistema, era a versão 4.8.4

GNU Fortran (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

A seguinte linha de diálogo de comando ilustrou o que eu tinha e o que fiz. Se você não tiver sorte com o Ubuntu 16.04 LTS, você pode tentar com o Ubuntu 14.04 LTS. Talvez funcione melhor com o software que você deseja compilar.

ubuntu@ubuntu:~$ sudo lsblk -fm
NAME   FSTYPE   LABEL                    MOUNTPOINT            NAME     SIZE OWNER GROUP MODE
sda                                                            sda     29.1G root  disk  brw-rw----
├─sda1 ntfs     usbdata                  /media/ubuntu/usbdata ├─sda1     7G root  disk  brw-rw----
├─sda2                                                         ├─sda2     1K root  disk  brw-rw----
├─sda3 vfat     usbboot                  /media/ubuntu/usbboot ├─sda3   244M root  disk  brw-rw----
├─sda4 iso9660  Ubuntu 14.04.1 LTS amd64 /cdrom                ├─sda4 999.5M root  disk  brw-rw----
└─sda5 ext4     casper-rw                                      └─sda5  20.9G root  disk  brw-rw----
sr0                                                            sr0     1024M root  cdrom brw-rw----
loop0  squashfs                          /rofs                 loop0  938.7M root  disk  brw-rw----
ubuntu@ubuntu:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/cow             21G   71M   20G   1% /
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           384M  1.2M  383M   1% /run
/dev/sda4       981M  981M     0 100% /cdrom
/dev/loop0      939M  939M     0 100% /rofs
none            4.0K     0  4.0K   0% /sys/fs/cgroup
tmpfs           1.9G  4.0K  1.9G   1% /tmp
none            5.0M     0  5.0M   0% /run/lock
none            1.9G   76K  1.9G   1% /run/shm
none            100M   56K  100M   1% /run/user
/dev/sda5        21G   71M   20G   1% /media/ubuntu/casper-rw
/dev/sda3       241M   46M  196M  19% /media/ubuntu/usbboot
/dev/sda1       7.0G   37M  7.0G   1% /media/ubuntu/usbdata
ubuntu@ubuntu:~$ sudo apt-get update
Ign cdrom://Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2) trusty InRelease
Ign cdrom://Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2) trusty/main Translation-en_US
Ign cdrom://Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2) trusty/main Translation-en
Ign cdrom://Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2) trusty/restricted Translation-en_US
Ign cdrom://Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2) trusty/restricted Translation-en
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]      
Ign http://archive.ubuntu.com trusty InRelease                            
Get:2 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:3 http://security.ubuntu.com trusty-security/main amd64 Packages [643 kB]
Hit http://archive.ubuntu.com trusty Release.gpg                    
Get:4 http://archive.ubuntu.com trusty-updates/main amd64 Packages [999 kB]
Get:5 http://security.ubuntu.com trusty-security/restricted amd64 Packages [14.0 kB]
Get:6 http://security.ubuntu.com trusty-security/main Translation-en [345 kB]  
Get:7 http://security.ubuntu.com trusty-security/restricted Translation-en [3,491 B]
Get:8 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [17.1 kB]
Get:9 http://archive.ubuntu.com trusty-updates/main Translation-en [491 kB]
Get:10 http://archive.ubuntu.com trusty-updates/restricted Translation-en [3,978 B]
Hit http://archive.ubuntu.com trusty Release                             
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Fetched 2,648 kB in 2s (1,235 kB/s)
Reading package lists... Done
ubuntu@ubuntu:~$ sudo apt-get install gfortran
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cpp-4.8 gcc-4.8 gcc-4.8-base gfortran-4.8 libasan0 libatomic1 libgcc-4.8-dev
  libgfortran-4.8-dev libgfortran3 libgomp1 libitm1 libquadmath0 libstdc++6
  libtsan0
Suggested packages:
  gcc-4.8-locales gcc-4.8-multilib gcc-4.8-doc libgcc1-dbg libgomp1-dbg
  libitm1-dbg libatomic1-dbg libasan0-dbg libtsan0-dbg libquadmath0-dbg
  gfortran-multilib gfortran-doc gfortran-4.8-multilib gfortran-4.8-doc
  libgfortran3-dbg
The following NEW packages will be installed:
  gfortran gfortran-4.8 libgfortran-4.8-dev libgfortran3
The following packages will be upgraded:
  cpp-4.8 gcc-4.8 gcc-4.8-base libasan0 libatomic1 libgcc-4.8-dev libgomp1
  libitm1 libquadmath0 libstdc++6 libtsan0
11 upgraded, 4 newly installed, 0 to remove and 687 not upgraded.
Need to get 17.4 MB of archives.
After this operation, 19.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main gfortran amd64 4:4.8.2-1ubuntu6 [1,252 B]
Get:2 http://security.ubuntu.com/ubuntu/ trusty-security/main libtsan0 amd64 4.8.4-2ubuntu1~14.04.3 [94.9 kB]
Get:3 http://security.ubuntu.com/ubuntu/ trusty-security/main libquadmath0 amd64 4.8.4-2ubuntu1~14.04.3 [126 kB]
Get:4 http://security.ubuntu.com/ubuntu/ trusty-security/main libitm1 amd64 4.8.4-2ubuntu1~14.04.3 [28.5 kB]
Get:5 http://security.ubuntu.com/ubuntu/ trusty-security/main libgomp1 amd64 4.8.4-2ubuntu1~14.04.3 [23.1 kB]
Get:6 http://security.ubuntu.com/ubuntu/ trusty-security/main libatomic1 amd64 4.8.4-2ubuntu1~14.04.3 [8,636 B]
Get:7 http://security.ubuntu.com/ubuntu/ trusty-security/main libasan0 amd64 4.8.4-2ubuntu1~14.04.3 [63.1 kB]
Get:8 http://security.ubuntu.com/ubuntu/ trusty-security/main gcc-4.8 amd64 4.8.4-2ubuntu1~14.04.3 [5,047 kB]
Get:9 http://security.ubuntu.com/ubuntu/ trusty-security/main cpp-4.8 amd64 4.8.4-2ubuntu1~14.04.3 [4,595 kB]
Get:10 http://security.ubuntu.com/ubuntu/ trusty-security/main libgcc-4.8-dev amd64 4.8.4-2ubuntu1~14.04.3 [1,688 kB]
Get:11 http://security.ubuntu.com/ubuntu/ trusty-security/main gcc-4.8-base amd64 4.8.4-2ubuntu1~14.04.3 [16.2 kB]
Get:12 http://security.ubuntu.com/ubuntu/ trusty-security/main libstdc++6 amd64 4.8.4-2ubuntu1~14.04.3 [259 kB]
Get:13 http://security.ubuntu.com/ubuntu/ trusty-security/main libgfortran3 amd64 4.8.4-2ubuntu1~14.04.3 [248 kB]
Get:14 http://security.ubuntu.com/ubuntu/ trusty-security/main libgfortran-4.8-dev amd64 4.8.4-2ubuntu1~14.04.3 [269 kB]
Get:15 http://security.ubuntu.com/ubuntu/ trusty-security/main gfortran-4.8 amd64 4.8.4-2ubuntu1~14.04.3 [4,883 kB]
Fetched 17.4 MB in 23s (724 kB/s)                                              
(Reading database ... 169556 files and directories currently installed.)
Preparing to unpack .../libtsan0_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libtsan0:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../libquadmath0_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libquadmath0:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../libitm1_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libitm1:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../libgomp1_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libgomp1:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../libatomic1_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libatomic1:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../libasan0_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libasan0:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../gcc-4.8_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking gcc-4.8 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../cpp-4.8_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking cpp-4.8 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../libgcc-4.8-dev_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libgcc-4.8-dev:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Preparing to unpack .../gcc-4.8-base_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking gcc-4.8-base:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up gcc-4.8-base:amd64 (4.8.4-2ubuntu1~14.04.3) ...
(Reading database ... 169556 files and directories currently installed.)
Preparing to unpack .../libstdc++6_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libstdc++6:amd64 (4.8.4-2ubuntu1~14.04.3) over (4.8.2-19ubuntu1) ...
Setting up libstdc++6:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Selecting previously unselected package libgfortran3:amd64.
(Reading database ... 169568 files and directories currently installed.)
Preparing to unpack .../libgfortran3_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libgfortran3:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Selecting previously unselected package libgfortran-4.8-dev:amd64.
Preparing to unpack .../libgfortran-4.8-dev_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking libgfortran-4.8-dev:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Selecting previously unselected package gfortran-4.8.
Preparing to unpack .../gfortran-4.8_4.8.4-2ubuntu1~14.04.3_amd64.deb ...
Unpacking gfortran-4.8 (4.8.4-2ubuntu1~14.04.3) ...
Selecting previously unselected package gfortran.
Preparing to unpack .../gfortran_4%3a4.8.2-1ubuntu6_amd64.deb ...
Unpacking gfortran (4:4.8.2-1ubuntu6) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libtsan0:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libquadmath0:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libitm1:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libgomp1:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libatomic1:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libasan0:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up cpp-4.8 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libgcc-4.8-dev:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up gcc-4.8 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libgfortran3:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up libgfortran-4.8-dev:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Setting up gfortran-4.8 (4.8.4-2ubuntu1~14.04.3) ...
Setting up gfortran (4:4.8.2-1ubuntu6) ...
update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode
Processing triggers for libc-bin (2.19-0ubuntu6) ...
ubuntu@ubuntu:~$ gfortran --version
GNU Fortran (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

ubuntu@ubuntu:~$ gfortran -dumpversion
4.8
ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ubuntu:~$ 

Por favor note que eu não testei o que acontece depois de atualizar & amp; atualizando um sistema instalado de 14.04 LTS.

    
por sudodus 31.07.2017 / 21:02