这里主要描述我遇到的问题,很多大神已经有做解答,但是也有的bug不知所起,便一头埋昏。
bug1:
CMake Error at /home/dell/anaconda3/envs//lib/cmake/0t5Gui/0t5GuiconfigExtras.cmake:9(message):Failed to find "GL/gl.h" in"/home/dell/anaconda3/envs//include;/croot/qt-main 1693210824277/ build env/x86 64-conda-linux-gnu/sysroot/usr/include;/croot/qt-main 1693210824277/ build env/x86 64-conda-linux-gnu/sysroot/usr/include/libdrm;/croot/qt-main 1693210824277/ build env/x86 64-conda-linux-gnu/sysroot/usr/include".Call stack(most recent call first):/home/dell/anaconda3/envs//1ib/cmake/0t5Gui/0t5Guiconfig.cmake:233(include)/home/dell/anaconda3/envs//lib/cmake/0t5widgets/0t5widgetsconfig.cmake:100 (find package)Tests/CMakeLists.txt:1263(find package)
有师傅说是因为没有GPU。
但如gpt所言,安装mesa packages就可以了。
sudo apt-get install mesa-common-dev libglu1-mesa-dev
bug2:
随后你会遇到cmake继续有毛病
81%] Built target utilities
[84%]Linking cxx executable ../../bin/FaceLandmarkImg/usr/bin/ld: /lib/x86 64-linux-gnu/libwayland-client.so.0: undefined reference to ffi type uint32@LIBFFI BASE 7.0
/usr/bin/ld: /lib/x86 64-linux-gnu/libwayland-client.so.0: undefined reference to ffi type sint32@LIBFFI BASE 7.0
/usr/bin/ld: /lib/x86 64-linux-gnu/libp11-kit.so.8: undefined reference to “ffi closure allOCALIBFFI CLOSURE 7.0'
/usr/bin/ld: /lib/x86 64-linux-gnu/libwayland-client.so.0: undefined reference to “ffi calI@LIBFFI BASE 7.8
/usr/bin/ld: /lib/x86 64-linux-gnu/libp11-kit.so.0: undefined reference to “ffi type uint8@LIBFFI BASE 7.0'
/usr/bin/ld: /lib/x86 64-linux-gnu/libp11-kit.so.0: undefined reference to “ffi prep closure lOC@LIBFFI CLOSURE 7.0'
/usr/bin/ld: /lib/x86 64-linux-gnu/libp11-kit.so.0: undefined reference to ffi type uint64@LIBFFI BASE 7.0'
/usr/bin/ld: /lib/x86 64-linux-gnu/libwayland-client.so.0: undefined reference to “ffi type pointen@LIBFFI BASE 7.8'
/usr/bin/ld: /lib/x86 64-linux-gnu/libwayland-client.so.0: undefined reference to “ffi type vOidGLIBFFI BASE 7.8'
/usr/bin/ld: /lib/x86 64-linux-gnu/libwayland-client.so.0: undefined reference to “ffi prep Cif@LIBFFI BASE 7.8'
collect2:error:ld returned 1 exit statusmake[2]:
*** [exe/FaceLandmarkImg/CMakefiles/faceLandmarkImg.dir/build,make:120: bin/faceLandmarkImg] Error 1make[1]:
*** [CMakefiles/Makefile2:309: exe/faceLandmarkImg/cMakefiles/faceLandmarkImg.dir/all] Error 2
***[Makefile:130:alll Error 2
先检查
locate libffi.so.7
进入到这里
/home/dell/anaconda3/lib/libffi.so.7
pwd
ls -al | grep ffi
不要在任何虚拟环境下修改
rm libffi.so.7
ln -s /lib/x86_64-linux-gun/libffi.so.7.1.0 libffi.so.7
终极bug3:
Could not find the HAAR face detector location
这个报错也其实可以去跑的,就是用不同的方法检测人脸,但是我把这几个文件(GitHub找的)下载放到bin下,就解决了。
haarcascade frontalcatface.xml
haarcascade frontalcatface extended.xml
haarcascade frontalface alt.xml
haarcascade frontalface alt2.xml