无法安装" vcd"包装在RStudio服务器上

时间:2018-05-28 08:55:37

标签: amazon-web-services rstudio-server install.packages

我正在尝试安装" vcd"在使用Amazon VPC的RStudio服务器上(istance type - t2.micro)并收到此消息:

Installing package into ‘/home/gogamd/R/x86_64-redhat-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘lmtest’

trying URL 'https://cran.rstudio.com/src/contrib/lmtest_0.9-36.tar.gz'
Content type 'application/x-gzip' length 184216 bytes (179 KB)
==================================================
downloaded 179 KB

trying URL 'https://cran.rstudio.com/src/contrib/vcd_1.4-4.tar.gz'
Content type 'application/x-gzip' length 968929 bytes (946 KB)
==================================================
downloaded 946 KB

* installing *source* package ‘lmtest’ ...
** package ‘lmtest’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -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 init.c -o init.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 pan.f -o pan.o
f951: Warning: Nonexistent include directory ‘/usr/lib64/gfortran/modules’ [-Wmissing-include-dirs]
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o lmtest.so init.o pan.o -lgfortran -lm -lquadmath -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lquadmath
collect2: error: ld returned 1 exit status
make: *** [lmtest.so] Error 1
ERROR: compilation failed for package ‘lmtest’
* removing ‘/home/gogamd/R/x86_64-redhat-linux-gnu-library/3.4/lmtest’
Warning in install.packages :
  installation of package ‘lmtest’ had non-zero exit status
ERROR: dependency ‘lmtest’ is not available for package ‘vcd’
* removing ‘/home/gogamd/R/x86_64-redhat-linux-gnu-library/3.4/vcd’
Warning in install.packages :
  installation of package ‘vcd’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmprKTvJq/downloaded_packages’

我试图安装" lmtest"。还有问题:

Installing package into ‘/home/gogamd/R/x86_64-redhat-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/lmtest_0.9-36.tar.gz'
Content type 'application/x-gzip' length 184216 bytes (179 KB)
==================================================
downloaded 179 KB

* installing *source* package ‘lmtest’ ...
** package ‘lmtest’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -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 init.c -o init.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 pan.f -o pan.o
f951: Warning: Nonexistent include directory ‘/usr/lib64/gfortran/modules’ [-Wmissing-include-dirs]
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o lmtest.so init.o pan.o -lgfortran -lm -lquadmath -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lquadmath
collect2: error: ld returned 1 exit status
make: *** [lmtest.so] Error 1
ERROR: compilation failed for package ‘lmtest’
* removing ‘/home/gogamd/R/x86_64-redhat-linux-gnu-library/3.4/lmtest’
Warning in install.packages :
  installation of package ‘lmtest’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmprKTvJq/downloaded_packages’

安装其他软件包,例如" bench"没有导致这个错误。 有没有解决方案?

1 个答案:

答案 0 :(得分:0)

问题在于:

/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lquadmath

您需要在VPC实例上安装libgfortran(GNU Fortran)和libquadmath软件包。