Skip to content

linux AMI: ‘/usr/lib64/gfortran/modules'

0

In a Linux AMI, I'm having trouble getting an R package (Hmisc) to install.
I'm not sure how to install /usr/lib64/gfortran/modules.

Steps to reproduce:

Launch Linux AMI
connect to it via ssh
type 'R' at command prompt
type 'install.packages("Hmisc") at R prompt
f951: Warning: Nonexistent include directory ‘/usr/lib64/gfortran/modules’ [-Wmissing-include-dirs]

more detail:
trying URL 'https://ftp.osuosl.org/pub/cran/src/contrib/Hmisc_4.2-0.tar.gz'
Content type 'application/x-gzip' length 732731 bytes (715 KB)

downloaded 715 KB

** installing *source package ‘Hmisc’ ...
** package ‘Hmisc’ successfully unpacked and MD5 sums checked
** libs
gcc64 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Hmisc.c -o Hmisc.o
gfortran -m64 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules -c cidxcn.f -o cidxcn.o
f951: Warning: Nonexistent include directory ‘/usr/lib64/gfortran/modules’ [-Wmissing-include-dirs]
cidxcn.f:70:5:

notes: /usr/lib64/
[ec2-user@ip-172-31-19-210 lib64]$ ls -la libgfor*
lrwxrwxrwx 1 root root 53 Apr 23 02:46 libgfortran.so -> /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgfortran.so
lrwxrwxrwx 1 root root 20 Nov 27 18:20 libgfortran.so.3 -> libgfortran.so.3.0.0
-rwxr-xr-x 1 root root 1205048 Sep 4 2017 libgfortran.so.3.0.0

notes: /usr/lib/gcc/x86_64-amazon-linux/6.4.1/
[ec2-user@ip-172-31-19-210 lib64]$ cd /usr/lib/gcc/x86_64-amazon-linux/6.4.1/
[ec2-user@ip-172-31-19-210 6.4.1]$ ls -la libgfor*
-rw-r--r-- 1 root root 2922838 Sep 4 2017 libgfortran.a
lrwxrwxrwx 1 root root 38 Nov 27 18:21 libgfortran.so -> ../../../../lib64/libgfortran.so.3.0.0
-rw-r--r-- 1 root root 269 Sep 4 2017 libgfortran.spec

So, everything ultimately refers to libgfortran.so.3.0.0

What do I need to do so that install.packages('Hmisc') will complete without errors?

Things I tried:
sudo yum install gcc-fortran

Thank you.

asked 7 years ago699 views

1 Answer
0

Problem was fixed by updating path in R configuration files.
/usr/lib64/R/etc/Makeconf
changed -I/usr/lib64/gfortran/modules to:
-I/usr/lib64

answered 7 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.