小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
catkin_make一个功能包时报错
-
系统:ubuntu 22.04
ros安装方式 docker+melodic(vscode加插件开发)
出现的问题 运行catkin_make时报错:root@10e25021c658:/home/caochuang/ws15# catkin_make
Base path: /home/caochuang/ws15
Source space: /home/caochuang/ws15/src
Build space: /home/caochuang/ws15/build
Devel space: /home/caochuang/ws15/devel
Install space: /home/caochuang/ws15/installRunning command: "make cmake_check_build_system" in "/home/caochuang/ws15/build"
-- Using CATKIN_DEVEL_PREFIX: /home/caochuang/ws15/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/caochuang/ws15/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17")
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 15 packages in topological order:
-- ~~ - playgrounds
-- ~~ - common
-- ~~ - vehicle_model
-- ~~ - forward_simulator
-- ~~ - motion_predictor
-- ~~ - vehicle_msgs
-- ~~ - aux_tools
-- ~~ - phy_simulator
-- ~~ - semantic_map_manager
-- ~~ - route_planner
-- ~~ - behavior_planner
-- ~~ - ai_agent_planner
-- ~~ - eudm_planner
-- ~~ - ssc_planner
-- ~~ - planning_integrated
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'playgrounds'
-- ==> add_subdirectory(EPSILON/core/playgrounds)
-- +++ processing catkin package: 'common'
-- ==> add_subdirectory(EPSILON/core/common)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
EPSILON/core/common/cmake/FindGlog.cmake:40 (find_package_handle_standard_args)
EPSILON/core/common/CMakeLists.txt:25 (find_package)-- Configuring incomplete, errors occurred!
See also "/home/caochuang/ws15/build/CMakeFiles/CMakeOutput.log".
See also "/home/caochuang/ws15/build/CMakeFiles/CMakeError.log".
Makefile:320: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
root@10e25021c658:/home/caochuang/ws15# -
实在不知道咋弄了,求解答~~
-
@827749589 在 catkin_make一个功能包时报错 中说:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
Call Stack (most recent call first):没有gloh
参考$ sudo apt install libgoogle-glog-dev
Also,
$ sudo apt-get install libgflags-dev $ sudo apt install libgoogle-glog-dev $ sudo apt-get install protobuf-compiler libprotobuf-dev
since initially I didn't have any of them installed.
试一试看~
最后建议
@小鱼 在 提问前必看!一定要看!必须看一下! 中说:
先搜索再提问,很多问题其实都有解决方案,确保你自己对自己的问题有一定了解再提问
-
@小鱼 在 catkin_make一个功能包时报错 中说:
sudo apt-get install protobuf-compiler libprotobuf-dev
感谢解答,都已经安装了但是没用
-
@827749589
首先确认已经装了@小鱼 在 catkin_make一个功能包时报错 中说:
$ sudo apt install libgoogle-glog-dev
如果装了还不行
那应该就是环境变量问题,检查下PATH,
echo $PATH
然后试试
sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf" sudo ldconfig
之后再次编译
-
@小鱼 $ sudo apt-get install libgflags-dev
$ sudo apt install libgoogle-glog-dev
$ sudo apt-get install protobuf-compiler libprotobuf-dev
我有个疑问,就是在docker容器外用上面这些命令安装这些库,那这些库在docker容器里面会生效吗? -
@827749589 不会生效,所有的操作都要在容器里操作
-
@小鱼 那在容器里,这些命令就没办法使用了,需要自己手动安装吧