bin / ld:找不到-l <nameofthelibrary>安装BigARTM

时间:2017-01-19 16:55:12

标签: c++ linux gcc centos

我尝试在Centos 7上根据此tutorial安装BigARTM。 但是我收到了这个错误:

/bin/ld: cannot find -lboost_thread-mt
/bin/ld: cannot find -lboost_program_options-mt
/bin/ld: cannot find -lboost_date_time-mt
/bin/ld: cannot find -lboost_filesystem-mt
/bin/ld: cannot find -lboost_iostreams-mt
/bin/ld: cannot find -lboost_system-mt
/bin/ld: cannot find -lboost_chrono-mt
/bin/ld: cannot find -lboost_timer-mt
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function 'sem_open':
(.text+0x6823): warning: the use of 'mktemp' is dangerous, better use 'mkstemp'
collect2: error: ld returned 1 exit status
make[2]: [bin/bigartm] Error 1
make[1]:  [src/bigartm/CMakeFiles/bigartm.dir/all] Error 2
make:  [all] Error 2

我使用'Development Tools'安装了yum,我在/usr/lib64

中找到了库
rpm -ql boost-devel | grep '_program-\|_date_time-\|_thread-\|_filesystem-\|_iostreams-\|_system-\|_chrono-\|_timer-' 
/usr/lib64/libboost_chrono-mt.so
/usr/lib64/libboost_date_time-mt.so
/usr/lib64/libboost_filesystem-mt.so
/usr/lib64/libboost_iostreams-mt.so
/usr/lib64/libboost_system-mt.so
/usr/lib64/libboost_thread-mt.so
/usr/lib64/libboost_timer-mt.so

我尝试了三种方式:

  1. 创建从ln/usr/lib64/libboost_<name>-mt.so的链接(使用/usr/lib64/lboost_<name>-mt.so),并将/usr/lib64添加到LD_LIBRARY_PATH
  2. 创建从/usr/lib64/libboost_<name>-mt.so/usr/lib/lboost_<name>-mt.so的链接。
  3. LIBS = -L /usr/lib64添加到MakeFile。
  4. 例如:

    [oshri@analytics build]$ ls -l /usr/lib/\*program\*
    lrwxrwxrwx 4 root root 37 Jan 19 17:38 /usr/lib/lboost_program_options-mt -> libboost_program_options-mt.so.1.53.0
    lrwxrwxrwx 4 root root 37 Jan 19 17:38 /usr/lib/lboost_program_options-mt.so -> libboost_program_options-mt.so.1.53.0
    [oshri@analytics build]$ ls -l /usr/lib64/\*program\*
    lrwxrwxrwx 4 root root     37 Jan 19 17:38 /usr/lib64/lboost_program_options-mt.so -> libboost_program_options-mt.so.1.53.0
    lrwxrwxrwx 4 root root     37 Jan 19 17:38 /usr/lib64/libboost_program_options-mt.so -> libboost_program_options-mt.so.1.53.0
    -rwxr-xr-x 1 root root 468952 Nov  5 20:58 /usr/lib64/libboost_program_options-mt.so.1.53.0
    lrwxrwxrwx 1 root root     34 Jan 19 17:38 /usr/lib64/libboost_program_options.so -> libboost_program_options.so.1.53.0
    -rwxr-xr-x 1 root root 468944 Nov  5 20:58 /usr/lib64/libboost_program_options.so.1.53.0
    [oshri@analytics build]$ printenv LD_LIBRARY_PATH
    /home/oshri/PycharmProjects/EuroSalesOptimization/runtime/:/usr/lib64/
    

0 个答案:

没有答案