当我尝试按this blog post中所述安装rcppmlpack2
时,我收到以下内容。我使用以下代码remotes::install_github("rcppmlpack/rcppmlpack2")
/usr/local/clang4/bin/clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/clang4/lib -o RcppMLPACK.so LARS.o RcppExports.o coverTreeNeighbor.o init.o kMeans.o linearRegression.o logisticRegression.o naiveBayesClassifier.o -L/usr/local/lib -L/usr/local/lib/ -lm -l/usr/local/lib/libarmadillo.dylib -l/usr/local/lib/libboost_program_options-mt.dylib -l/usr/local/lib/libboost_unit_test_framework-mt.dylib -l/usr/local/lib/libboost_serialization-mt.dylib -lmlpack -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: library not found for -l/usr/local/lib/libarmadillo.dylib
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RcppMLPACK.so] Error 1
ERROR: compilation failed for package ‘RcppMLPACK’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppMLPACK’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/tc/4ygpk4nd6tqctkm5gdnw85340000gn/T//RtmpQjVuQL/remotesa73514ed0ed5/rcppmlpack-rcppmlpack2-377b445’ had non-zero exit status
我的会话信息
R Under development (unstable) (2018-01-26 r74169)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.3
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] drat_0.1.4 compiler_3.5.0 tools_3.5.0 yaml_2.1.16 remotes_1.1.1
有人能指出我为什么无法安装软件包的正确方向。文件libarmadillo.dylib
根据R。
> file.exists("/usr/local/lib/libarmadillo.dylib")
[1] TRUE