我无法在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’
其他(也许)相关信息:
在此先感谢您的帮助!
答案 0 :(得分:1)
在终端中使用此命令满足依赖性。
sudo apt-get install libblas-dev liblapack-dev
希望这会有所帮助(Y)