天天看點

編譯Caffe錯誤:libpython3.5m.a(abstract.o): relocation R_X86_64_32S against

編譯之,錯誤如下:

libpython3.5m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC      

 其實這個錯誤很常見。需要重新編譯

Python

3.5……麻煩?比編譯不過強,有辦法就很好啦!

./configure --prefix=/usr/local/  --enable-shared CFLAGS=-fPIC
make clean
make && sudo make install      

 一般建議删除目錄後,重新解壓、編譯。