【问题标题】:Cannot install "vcd" package on the RStudio Server无法在 RStudio 服务器上安装“vcd”包
【发布时间】:2018-11-06 19:43:33
【问题描述】:

我正在尝试使用 Amazon VPC(istance 类型 - t2.micro)在 RStudio Server 上安装“vcd”并收到此消息:

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”并没有导致这个错误。 有什么解决办法吗?

【问题讨论】:

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


    【解决方案1】:

    问题出在这里:

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

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

    【讨论】:

    • 谢谢!但是,如果登录后我只看到 RStudio,如何在 VPC 上安装任何东西?
    猜你喜欢
    • 2012-12-05
    • 2019-01-20
    • 2019-01-19
    • 2012-06-28
    • 2018-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多