目前,我正在尝试将毫升包安装到Ubuntu12.04。当我执行make install时,我得到了以下错误。
[ 0%] Built target mlpack_headers
Linking CXX shared library ../../lib/libmlpack.so
/usr/bin/ld: /usr/local/lib/libboost_program_options.a(cmdline.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libboost_program_options.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [lib/libmlpack.so.1.0] Error 1
make[1]: *** [src/mlpack/CMakeFiles/mlpack.dir/all] Error 2
make: *** [all] Error 2如何修复此错误并成功安装mlpack?
发布于 2014-12-23 10:32:28
我也有同样的问题。我使用以下方法重新安装每个依赖项
sudo apt-get install libboost-math-dev libboost-program-options-dev libboost-random-dev
libboost-test-dev libxml2-dev liblapack-dev libblas-dev libarmadillo-dev在mlpack文件夹中:执行以下命令
mkdir build
cd build
cmake ../
makes
sudo make install之后,要运行可执行文件,请使用此链接设置路径……为我工作过。
发布于 2015-01-07 09:05:20
使用-fPIC等重新编译您的boost,例如/bjam=-fPIC-un-python-unt-图形_parallel-无图形-无波安装。
https://askubuntu.com/questions/518498
复制相似问题