首页 > 代码库 > make[2]: *** No rule to make target `/root/.pyenv/versions/anaconda3-2.4.0/lib/libpython3.5m.so', needed by `evaluation.so'. Stop.

make[2]: *** No rule to make target `/root/.pyenv/versions/anaconda3-2.4.0/lib/libpython3.5m.so', needed by `evaluation.so'. Stop.

当出现No rule to make target ,肯定是Makefile有问题。

有的makefile是脚本生成的,你得看脚本的配置文件对不对。

我的是这个脚本生成的。发现是Pythondir的配置不对:

PYTHON_DIR=/home/zgq/anaconda3
cmake \
-DPYTHON_LIBRARY=$PYTHON_DIR/lib/libpython3.5m.so \
-DPYTHON_INCLUDE_DIR=$PYTHON_DIR/include/python3.5m \
-DPYTHON_INCLUDE_DIR2=$PYTHON_DIR/include \
-DBoost_INCLUDE_DIR=/usr/local/include \
-DBoost_NumPy_INCLUDE_DIR=/usr/local/include \
-DBoost_NumPy_LIBRARY_DIR=/usr/local/lib \
-DOpenCV_DIR=/usr/local/share/OpenCV \
-Wno-dev \
. && make

改过来就OK了

make[2]: *** No rule to make target `/root/.pyenv/versions/anaconda3-2.4.0/lib/libpython3.5m.so', needed by `evaluation.so'. Stop.