在R / 3.0.2中安装minqa时出错

时间:2014-01-15 21:57:18

标签: r lme4 rscript

我使用their github account上的README.md文件安装lme4,但在安装依赖项时失败了。我尝试单独安装它们,但在安装minqa包时仍然崩溃。我在RHEL6上使用R / 3.0.2。在构建期间,编译器争论RScript不存在,因为我检查它是在R / bin文件夹中。

以下是R INSTALL的日志:

$ R CMD INSTALL minqa_1.2.2.tar.gz 
* installing to library ‘/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library’
* installing *source* package ‘minqa’ ...
** package ‘minqa’ successfully unpacked and MD5 sums checked
** libs
gfortran   -fpic  -g -O2  -c altmov.f -o altmov.o
gfortran   -fpic  -g -O2  -c bigden.f -o bigden.o
gfortran   -fpic  -g -O2  -c biglag.f -o biglag.o
gfortran   -fpic  -g -O2  -c bobyqa.f -o bobyqa.o
gfortran   -fpic  -g -O2  -c bobyqb.f -o bobyqb.o
gfortran   -fpic  -g -O2  -c lagmax.f -o lagmax.o
g++ -I/gpfs/apps/x86_64-rhel6/R/3.0.2/R/include -DNDEBUG  -I/usr/local/include -I"/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/Rcpp/include"   -fpic  -g -O2  -c minqa.cpp -o minqa.o
gfortran   -fpic  -g -O2  -c newuoa.f -o newuoa.o
gfortran   -fpic  -g -O2  -c newuob.f -o newuob.o
gfortran   -fpic  -g -O2  -c prelim.f -o prelim.o
gfortran   -fpic  -g -O2  -c rescue.f -o rescue.o
gfortran   -fpic  -g -O2  -c trsapp.f -o trsapp.o
gfortran   -fpic  -g -O2  -c trsbox.f -o trsbox.o
gfortran   -fpic  -g -O2  -c trstep.f -o trstep.o
gfortran   -fpic  -g -O2  -c uobyqa.f -o uobyqa.o
gfortran   -fpic  -g -O2  -c uobyqb.f -o uobyqb.o
gfortran   -fpic  -g -O2  -c update.f -o update.o
gfortran   -fpic  -g -O2  -c updatebobyqa.f -o updatebobyqa.o
Rscript execution error: No such file or directory
g++ -shared -L/usr/local/lib64 -o minqa.so altmov.o bigden.o biglag.o bobyqa.o bobyqb.o lagmax.o minqa.o newuoa.o newuob.o prelim.o rescue.o trsapp.o trsbox.o trstep.o uobyqa.o uobyqb.o update.o updatebobyqa.o -lgfortran -lm -L/gpfs/apps/x86_64-rhel6/R/3.0.2/R/lib -lR
Rscript execution error: No such file or directory
installing to /gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs/minqa.so':
  /gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs/minqa.so: undefined symbol: _ZTIN4Rcpp7RObjectE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa’

2 个答案:

答案 0 :(得分:16)

尝试将lme4从1.0-5升级到1.0-6时也会发生类似错误,错误就像

Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/local/lib/R/site-library/minqa/libs/minqa.so':
  libRcpp.so: cannot open shared object file: No such file or directory
ERROR: lazy loading failed for package ‘lme4’

只需按以下顺序安装软件包即可解决此错误

install.packages('Rcpp')
install.packages('RcppEigen')
install.packages('minqa')
install.packages('lme4')

我猜这与RCpp相关只是将版本从0.10.6升级到0.11.0并且发生了一些ABI中断变化?

来自Credit

dmbates

答案 1 :(得分:0)

/usr/share/R/share/make/shlib.mk:6:目标'minqa.so'的配方失败:*** [minqa.so]错误1

安装minqa(lme4所需)时出现了相同的错误。这是由于修改了/etc/R/Rprofile.site

中的.First()

停用。首先,或使用R --vanilla。