cannot find -lpthreads ERROR

1,358 views
Skip to first unread message

Antonio Ríos

unread,
Jan 14, 2016, 3:39:03 AM1/14/16
to Caffe Users
Hi everyone,

I'm trying to install Caffe. I have already installed all packages and the dependences, but when I use "cmake .." I get the next error:

/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec3109833671] Error 1
gmake[1]: Leaving directory `/home/sproject/caffe/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec3109833671/fast] Error 2

Could anyone help me?? I'm using CentOS 6.

Thanks for your attention.

Antonio Ríos

unread,
Jan 20, 2016, 4:19:32 AM1/20/16
to Caffe Users
Hi,

I fixed the error by myself. I have reinstalled boost library and now I can use "make all" and "make test" fine, but when I try to use "make runtest" I get the next error:
.build_release/tools/caffe
.build_release/tools/caffe: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory
make: *** [runtest] Error 127


Could anyone help me?? I'm using CentOS 6.

Thanks,

Chan Kim

unread,
Jan 20, 2016, 9:45:30 AM1/20/16
to Caffe Users
I'm using CentOS6.7 and the prerequisite section told me to install boost-devel so I did it (yum install boost-devel)
I saw the same error before (can't find -lboost_thread) so I have added at /usr/lib64 a symbolic link libboost_thread.so pointing libboost_thread_mt.so.5. (that was the closest looking file, only multi-thread version?)
I'm not sure this was the right method but anyway the error was gone.
Hope this can be of any help to anybody later.
Thanks.

Jan C Peters

unread,
Jan 25, 2016, 7:36:43 AM1/25/16
to Caffe Users
glog is just another dependency of caffe, a library for logging by google. Apparently you did _not_ install all the dependencies (correctly), or you would not face this error. The respective packages are called "glog" and "glog-devel" (although glog-devel should pull in glog automatically). Have you followed the instructions in http://caffe.berkeleyvision.org/install_yum.html?

Jan
Reply all
Reply to author
Forward
0 new messages