如何解决依赖性问题和安装qpcR软件包时出错?

时间:2018-06-27 11:37:18

标签: r installation ubuntu-16.04

我无法在R中使用此命令安装qpcR软件包:

install.packages("qpcR")

显然,最初一切都很好:

Installing package into ‘/home/emanuel/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/qpcR_1.4-1.tar.gz'
Content type 'application/x-gzip' length 4303726 bytes (4.1 MB)
==================================================
downloaded 4.1 MB

* installing *source* package ‘qpcR’ ...
** package ‘qpcR’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-      protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c registerDynamicSymbol.c -o registerDynamicSymbol.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c smth.c -o smth.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o qpcR.so registerDynamicSymbol.o smth.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR

然后事情开始出错:

usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'qpcR.so' failed
make: *** [qpcR.so] Error 1
ERROR: compilation failed for package ‘qpcR’
* removing ‘/home/emanuel/R/x86_64-pc-linux-gnu-library/3.4/qpcR’
Warning in install.packages :
installation of package ‘qpcR’ had non-zero exit status

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

其他(也许)相关信息:

  • 在上述内容之前,我遇到了另一个qpcR依赖项rgl包,我尝试了尝试另一个问题“ Error in installing rgl package”中的所有建议。
  • 我对以下内容进行了简短搜索:“ -llpack”,“-lblas”,“ qpcR.so”。不幸的是,至少在我看来,没有任何事情与我的特定问题相关。
  • 我使用的Mint具有以下规格:Linux版本4.8.0-53-通用(buildd @ lgw01-56)(gcc版本5.4.0 20160609(Ubuntu 5.4.0-6ubuntu1〜16.04.4))#56〜16.04 .1-Ubuntu
  • R版本3.4.4
  • R studio版本1.1.453

在此先感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

在终端中使用此命令满足依赖性。

sudo apt-get install libblas-dev liblapack-dev

希望这会有所帮助(Y)