nloptr的安装:libstdc ++。so:无法读取符号:文件格式错误

时间:2018-12-14 07:10:46

标签: r libstdc++

我正在尝试通过执行以下命令来安装nloptr:

R CMD INSTALL nloptr_1.2.1.tar.gz

我收到以下错误:

/bin/sh ../libtool  --tag=CXX   --mode=link /home/kokep/bin/bin/g++    -L/home/kokep/bin/lib -L/home/kokep/bin/lib64 -L/mnt/projects/kokep/kokep/devel/libraries/zlib-1.2.11 -o testopt testfuncs.o testopt.o ../libnlopt_cxx.la -lm
libtool: link: /home/kokep/bin/bin/g++ -o testopt testfuncs.o testopt.o  -L/home/kokep/bin/lib -L/home/kokep/bin/lib64 -L/mnt/projects/kokep/kokep/devel/libraries/zlib-1.2.11 ../.libs/libnlopt_cxx.a /home/kokep/bin/lib/../lib/libstdc++.so -lm
/home/kokep/bin/lib/../lib/libstdc++.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [testopt] Error 1
make[2]: Leaving directory `/mnt/projects/kokep/kokep/devel/R/nloptr/src/nlopt_src/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/projects/kokep/kokep/devel/R/nloptr/src/nlopt_src'
make: *** [all] Error 2

我已经读到这是因为R指向32位库而不是64位,但是我可能错了。如何更改R目录的lib目录?预先感谢。

0 个答案:

没有答案