python setup.py install error: opencv2/opencv.hpp: 没有那个文件或目录 ld: cannot find -lgsl CFAR

这是一篇求助贴,想问问各位大佬有没有遇到过如下问题:

代码来源:https://github.com/nasir6/py_cfar

代码是GITHUB上下载的源码py_cfar,里面有一个setup.py文件是用来安装cfar包,但是运行这个文件会进行以下报错

main.cpp:118:1: warning: missing initializer for member ‘PyModuleDef::m_slots’ [-Wmissing-field-initializers]
 };
 ^
main.cpp:118:1: warning: missing initializer for member ‘PyModuleDef::m_traverse’ [-Wmissing-field-initializers]
main.cpp:118:1: warning: missing initializer for member ‘PyModuleDef::m_clear’ [-Wmissing-field-initializers]
main.cpp:118:1: warning: missing initializer for member ‘PyModuleDef::m_free’ [-Wmissing-field-initializers]
main.cpp:27:1: warning: ‘PyObject* PyCfar_new(PyTypeObject*, PyObject*, PyObject*)’ defined but not used [-Wunused-function]
 PyCfar_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 ^
g++ -pthread -shared -B /home/abcabc/anaconda3/envs/Test-ENV/compiler_compat -L/home/abcabc/anaconda3/envs/Test-ENV/lib -Wl,-rpath=/home/abcabc/anaconda3/envs/Test-ENV/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/main.o -L/usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_video -lopencv_videoio -lgsl -lgslcblas -o build/lib.linux-x86_64-3.7/cfar.cpython-37m-x86_64-linux-gnu.so
/home/abcabc/anaconda3/envs/Test-ENV/compiler_compat/ld: cannot find -lopencv_videoio
/home/abcabc/anaconda3/envs/Test-ENV/compiler_compat/ld: cannot find -lgsl
/home/abcabc/anaconda3/envs/Test-ENV/compiler_compat/ld: cannot find -lgslcblas
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

参考帖子解决:https://stackoverflow.com/questions/47512182/answer/submit

发现运行完

 ld -lgslcblas --verbose

之后结果如下:


==================================================
试图打开 //usr/local/lib/x86_64-linux-gnu/libgslcblas.so 失败
试图打开 //usr/local/lib/x86_64-linux-gnu/libgslcblas.a 失败
试图打开 //lib/x86_64-linux-gnu/libgslcblas.so 失败
试图打开 //lib/x86_64-linux-gnu/libgslcblas.a 失败
试图打开 //usr/lib/x86_64-linux-gnu/libgslcblas.so 失败
试图打开 //usr/lib/x86_64-linux-gnu/libgslcblas.a 失败
试图打开 //usr/local/lib64/libgslcblas.so 失败
试图打开 //usr/local/lib64/libgslcblas.a 失败
试图打开 //lib64/libgslcblas.so 失败
试图打开 //lib64/libgslcblas.a 失败
试图打开 //usr/lib64/libgslcblas.so 失败
试图打开 //usr/lib64/libgslcblas.a 失败
试图打开 //usr/local/lib/libgslcblas.so 失败
试图打开 //usr/local/lib/libgslcblas.a 失败
试图打开 //lib/libgslcblas.so 失败
试图打开 //lib/libgslcblas.a 失败
试图打开 //usr/lib/libgslcblas.so 失败
试图打开 //usr/lib/libgslcblas.a 失败
试图打开 //usr/x86_64-linux-gnu/lib64/libgslcblas.so 失败
试图打开 //usr/x86_64-linux-gnu/lib64/libgslcblas.a 失败
试图打开 //usr/x86_64-linux-gnu/lib/libgslcblas.so 失败
试图打开 //usr/x86_64-linux-gnu/lib/libgslcblas.a 失败
ld: 找不到 -lgslcblas

其中没有success,没有办法按照帖子里面的步骤解决,网上找解决办法也没有遇到合适的

到这一步黔驴技穷,还请各位大佬指点迷津

你可能感兴趣的:(python,ubuntu,目标检测,目标跟踪)