/usr/bin/ld: cannot find -lpython2

来源:互联网 发布:新来的淘宝店怎么推广 编辑:程序博客网 时间:2024/04/30 00:06
Q:
$ make 
[  1%] Built target proto
[ 84%] Built target caffe
[ 85%] Built target caffe.bin
[ 87%] Built target compute_image_mean
[ 88%] Built target convert_imageset
[ 88%] Built target device_query
[ 90%] Built target extract_features
[ 90%] Built target finetune_net
[ 90%] Built target net_speed_benchmark
[ 90%] Built target test_net
[ 92%] Built target train_net
[ 92%] Built target upgrade_net_proto_binary
[ 93%] Built target upgrade_net_proto_text
[ 95%] Built target upgrade_solver_proto_text
[ 95%] Built target classification
[ 95%] Built target convert_cifar_data
[ 95%] Built target convert_mnist_data
[ 96%] Built target convert_mnist_siamese_data
[ 98%] Built target pycaffe
[ 98%] Building Matlab interface: /home/junmuzi/Works/my_works/lstm/caffe/matlab/+caffe/private/caffe_.mexa64
Building with 'g++'.
Warning: You are using gcc version '4.8.4'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
Warning: You are using gcc version '4.8.4-2ubuntu1~14.04)'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
/usr/bin/ld: cannot find -lpython2
collect2: error: ld returned 1 exit status


make[2]: *** [../matlab/+caffe/private/caffe_.mexa64] Error 255
make[1]: *** [matlab/CMakeFiles/matlab.dir/all] Error 2
make: *** [all] Error 2
----
Solution:
modify file matlab/CMakeFiles/matlab.dir/build.make, and delete "-lpython2.7"
Then, re-make, "# make"
0 0
原创粉丝点击