在安装RcppArmadillo软件包时,我遇到了错误。
installing to /usr/lib64/R/library/RcppArmadillo/libs
** R
** inst
** preparing package for lazy loading
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'SHLIB.maker' not found
Error : unable to load R code in package ‘RcppArmadillo’
ERROR: lazy loading failed for package ‘RcppArmadillo’
* removing ‘/usr/lib64/R/library/RcppArmadillo’
Warning message:
In install.packages("RcppArmadillo_0.3.920.1.tar.gz", repos = NULL, :
installation of package ‘RcppArmadillo_0.3.920.1.tar.gz’ had non-zero exit status
答案 0 :(得分:0)
您需要将R&#s存储库添加到您的系统中:
使用您喜欢的文字编辑器(我使用gedit作为示例)打开/etc/apt/sources.list
:
sudo gedit /etc/apt/sources.list
将此行添加到文件中(如果这很慢,请使用另一个镜像。您可能还希望将精确更改为Ubuntu版本的代号 - 例如,可信任12.04):
deb http://cran.rstudio.com/bin/linux/ubuntu precise/
这对我有用install.packages('RcppArmadillo')
> install.packages('RcppArmadillo')
Installing package into ‘/home/priyankara/R/i686-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'http://mirror.bjtu.edu.cn/cran/src/contrib/RcppArmadillo_0.5.300.4.tar.gz'
Content type 'application/octet-stream' length 967193 bytes (944 KB)
==================================================
downloaded 944 KB
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
* checking LAPACK_LIBS: divide-and-conquer complex SVD available via system LAPACK
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/priyankara/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -I../inst/include -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppArmadillo.cpp -o RcppArmadillo.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/priyankara/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -I../inst/include -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/priyankara/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -I../inst/include -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c fastLm.cpp -o fastLm.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
installing to /home/priyankara/R/i686-pc-linux-gnu-library/3.2/RcppArmadillo/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (RcppArmadillo)