我试图在Cygwin中的R中安装一些R包。但安装失败,错误消息如下:
g++ -shared -L/usr/lib/R/lib -o BayesTree.dll BirthDeath.o ChangeRule.o Funs.o Lib.o Likelihood.o List.o MuS.o Node.o Prior.o Rlob.o Swap.o mbart.o -L/usr/lib/R/lib -lR -lintl -lpcre -llzma -lbz2 -lz -ltirpc -lrt -ldl -lm -liconv -licuuc -licui18n
mbart.o: In function `mbart':
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:336: undefined reference to `dcopy_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:337: undefined reference to `daxpy_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:338: undefined reference to `daxpy_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:347: undefined reference to `daxpy_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:348: undefined reference to `daxpy_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:350: undefined reference to `dcopy_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:384: undefined reference to `ddot_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:357: undefined reference to `dcopy_'
/tmp/RtmpFTd5dY/R.INSTALL299c3c70eccb/BayesTree/src/mbart.cpp:358: undefined reference to `daxpy_'
collect2: error: ld returned 1 exit status
make: *** [/usr/lib/R/share/make/shlib.mk:6: BayesTree.dll] Error 1
ERROR: compilation failed for package ‘BayesTree’
* removing ‘/usr/lib/R/site-library/BayesTree’
我查了一下错误,我查看的大部分帖子建议添加BLAS库或LAPACK库。但我已经在Cygwin中安装了两个:
/usr/lib/libblas.a
/usr/lib/libblas.dll.a
/usr/lib/liblapack.a
/usr/lib/liblapack.dll.a
所以我真的不知道问题是什么。