在安装opencv的过程中,我遇到了很多问题,并且在/usr/include中意外地删除了opencv文件夹。如何以正确的方式恢复它们,以便在尝试catkin_make我的ros工作区时不会发生以下错误?
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at /opt/ros/noetic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message):
Project 'cv_bridge' specifies '/usr/include/opencv4' as an include dir,
which is not found. It does neither exist as an absolute directory nor in
'${{prefix}}//usr/include/opencv4'. Check the issue tracker
'https://github.com/ros-perception/vision_opencv/issues' and consider
creating a ticket if the problem has not been reported yet.
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
LeGO-LOAM/LeGO-LOAM/CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/lukas/workspace/catkin_ws_legoloam/build/CMakeFiles/CMakeOutput.log".
See also "/home/lukas/workspace/catkin_ws_legoloam/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:320: cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed是否可以将文件夹从/usr/local/include复制到/usr/include,因为我已经成功安装了这些文件夹,还是会导致问题?
发布于 2021-11-30 05:37:39
您必须简单地使用APT还原/usr/include文件夹内容的功能:
sudo apt-get install --reinstall \
$(dpkg -S /usr/include/ | sed "s/,//g" | sed "s|: /usr/include||")/usr/local/include文件夹不受APT控制,因此不能使用上面的命令进行还原。
https://askubuntu.com/questions/1378335
复制相似问题