LD -o .build_release/lib/libcaffe.so.1.0.0
/usr/bin/ld: 找不到 -lpython3.5m
collect2: error: ld returned 1 exit status
Makefile:572: recipe for target '.build_release/lib/libcaffe.so.1.0.0' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1
这里提供另一种解决方法,如果你想用pyhton3,而且是anoconda3那么肯定不能用caffe包中的example.config。
你可能仔细看了config然后删除了pyhton3之前的注释,并且把python2注释了,而且还添加了anaconda的配置,然后你运行,就会出现本错误,你可以更改下把config中的3.5m改成3.5你会发现错误也跟着便,没错,就是因为你放出了python3的配置参数,导致了这个错误。所以你应该把python3注释回去。我的config如下:
## Refer to http://caffe.berkeleyvision.org/installation.html # Contributions simplifying and improving our build system are welcome! # cuDNN acceleration switch (uncomment to build with cuDNN). # USE_CUDNN := 1 # CPU-only switch (uncomment to build without GPU support). CPU_ONLY := 1 # uncomment to disable IO dependencies and corresponding data layers # USE_OPENCV := 0 # USE_LEVELDB := 0 # USE_LMDB := 0 # uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary) # You should not set this flag if you will be reading LMDBs with any # possibility of simultaneous read and write # ALLOW_LMDB_NOLOCK := 1 # Uncomment if you're using OpenCV 3 #