未找到 usr/bin/ld -lpthtread

未找到 usr/bin/ld -lpthtread

我正在尝试安装 TRIQS-1.0.0(git clonehttps://github.com/TRIQS/triqs.git在 Pentium(R) 双核 32 位 Ubuntu 14.04 系统上安装 .src 文件。使用以下命令

 mkdir build && cd build
 cmake -DCMAKE_INSTALL_PREFIX=~/build../src

-lpthreads not found即使所有依赖项都已安装,系统也会返回 。

在 Ubuntu 14.04 中哪里可以找到 pthreads?
输出日志的相关部分如下所示:

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/enukpere/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec2501535256/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2501535256.dir/build.make CMakeFiles/cmTryCompileExec2501535256.dir/build
make[1]: Entering directory `/home/enukpere/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/enukpere/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2501535256.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec2501535256.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec2501535256
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2501535256.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTryCompileExec2501535256.dir/CheckFunctionExists.c.o  -o cmTryCompileExec2501535256 -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [cmTryCompileExec2501535256] Error 1
make[1]: Leaving directory `/home/enukpere/build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec2501535256/fast] Error 

答案1

尝试安装以下依赖项(libboost14.04 中的版本为 1.54):

sudo apt-get install cmake git g++ libgfortran3 gfortran openmpi-bin openmpi-common \
     openmpi-checkpoint libopenmpi-dev libblas-dev liblapack-dev libfftw3-dev libgmp-dev \
     hdf5-tools libhdf5-serial-dev python-h5py libboost1.54-all-dev python-dev \
     python-numpy python-scipy python-virtualenv python-matplotlib doxygen\
     python-tornado python-zmq python-mpi4py cython

相关内容