有报错。surongfeng@surongfeng:~$ # 安装编译依赖
sudo apt install libogre-1.12-dev libbullet-dev libsimbody-dev
# 克隆指定版本源码(如gazebo11)
git clone -b gazebo11 https://github.com/osrf/gazebo
cd gazebo && mkdir build && cd build
cmake ../
make -j$(nproc)
sudo make install
[sudo] surongfeng 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
libogre-1.12-dev 已经是最新版 (1.12.10+dfsg2-3+b1)。
libbullet-dev 已经是最新版 (3.24+dfsg-2)。
libsimbody-dev 已经是最新版 (3.7+dfsg-3)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
正克隆到 'gazebo'...
remote: Enumerating objects: 289952, done.
remote: Counting objects: 100% (294/294), done.
remote: Compressing objects: 100% (145/145), done.
remote: Total 289952 (delta 201), reused 151 (delta 149), pack-reused 289658 (from 4)
接收对象中: 100% (289952/289952), 544.94 MiB | 1.13 MiB/s, 完成.
处理 delta 中: 100% (225254/225254), 完成.
正在更新文件: 100% (3714/3714), 完成.
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Gazebo version 11.15.1
-- Found CPack generators: DEB
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.4") found components: doxygen dot
-- High memory tests: enabled
--
====== Finding 3rd Party Packages ======
-- Operating system is Linux
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Checking for module 'freeimage>=3.9.0'
-- Package 'freeimage', required by 'virtual:world', not found
-- freeimage.pc not found, trying freeimage_include_dir and freeimage_library_dir flags.
-- Looking for FreeImage.h - not found
-- Missing: Unable to find FreeImage.h
-- Looking for libfreeimage - not found
-- Missing: Unable to find libfreeimage
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found version "3.21.12")
-- Missing: Google Protobuf Compiler Library (libprotoc-dev)
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/FindOpenGL.cmake:315 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
cmake/SearchForStuff.cmake:74 (include)
CMakeLists.txt:163 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
-- OpenAL not found, audio support will be disabled.
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C CXX) (found version "")
-- HDF5 not found
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
-- Checking for module 'libprofiler'
-- Package 'libprofiler', required by 'virtual:world', not found
-- Looking for libprofiler - not found
-- Checking for module 'libtcmalloc'
-- Package 'libtcmalloc', required by 'virtual:world', not found
-- Looking for libtcmalloc - not found
-- Looking for Simbody - found
-- Could NOT find DART (missing: DART_DIR)
-- Looking for DART - not found
-- DART 6.6 not found, for dart physics engine option, please install libdart6.6-dev.
-- Using system tinyxml.
-- Checking for module 'tinyxml'
-- Package 'tinyxml', required by 'virtual:world', not found
-- Looking for tinyxml headers - not found
-- Looking for tinyxml library - not found
-- Looking for tinyxml.h - not found
-- Missing: tinyxml
-- Using system tinyxml2.
-- Checking for module 'tinyxml2'
-- Package 'tinyxml2', required by 'virtual:world', not found
-- Looking for tinyxml2 headers - not found
-- Looking for tinyxml2 library - not found
-- Looking for tinyxml2 library dirs - not found
-- Looking for tinyxml2.h - not found
-- Missing: tinyxml2
-- Looking for libtar.h - not found
-- Looking for libtar.so - not found
-- Missing: libtar
-- Checking for module 'tbb'
-- Found tbb, version 2021.8.0
-- Checking for module 'OGRE-RTShaderSystem>=1.7.4'
-- Found OGRE-RTShaderSystem, version 1.12.10
-- Checking for module 'OGRE>=1.7.4'
-- Found OGRE, version 1.12.10
-- Checking for module 'OGRE-Terrain'
-- Found OGRE-Terrain, version 1.12.10
-- Checking for module 'OGRE-Overlay'
-- Found OGRE-Overlay, version 1.12.10
-- Checking for module 'ccd>=1.4'
-- Package 'ccd', required by 'virtual:world', not found
-- Using internal copy of libccd
-- Checking for module 'libswscale'
-- Found libswscale, version 6.7.100
-- Checking for module 'libavdevice>=56.4.100'
-- Package 'libavdevice', required by 'virtual:world', not found
-- libavdevice not found. Recording to a video device will be disabled.
-- Checking for module 'libavformat'
-- Found libavformat, version 59.27.100
-- Checking for module 'libavcodec'
-- Found libavcodec, version 59.37.100
-- Checking for module 'libavutil'
-- Found libavutil, version 57.28.100
-- Checking for modules 'playercore>=3.0;playerc++;playerwkb'
-- Package 'playercore', required by 'virtual:world', not found
-- Package 'playerc++', required by 'virtual:world', not found
-- Package 'playerwkb', required by 'virtual:world', not found
-- Player not found, gazebo plugin for player will not be built.
-- Checking for module 'gts'
-- Package 'gts', required by 'virtual:world', not found
-- GNU Triangulation Surface library not found - Gazebo will not have CSG support.
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 3.24
-- Bullet found: 3.24
-- Checking for module 'libusb-1.0'
-- Found libusb-1.0, version 1.0.26
-- Looking for libusb-1.0 - found. USB peripherals support enabled.
-- Checking for module 'OculusVR'
-- Package 'OculusVR', required by 'virtual:world', not found
-- Oculus Rift support will be disabled.
CMake Error at cmake/SearchForStuff.cmake:648 (find_package):
By not providing "Findsdformat9.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"sdformat9", but CMake did not find one.
Could not find a package configuration file provided by "sdformat9"
(requested version 9.8) with any of the following names:
sdformat9Config.cmake
sdformat9-config.cmake
Add the installation prefix of "sdformat9" to CMAKE_PREFIX_PATH or set
"sdformat9_DIR" to a directory containing one of the above files. If
"sdformat9" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:163 (include)
-- Configuring incomplete, errors occurred!
See also "/home/surongfeng/gazebo/build/CMakeFiles/CMakeOutput.log".
make: *** 没有指明目标并且找不到 makefile。 停止。
make: *** 没有规则可制作目标“install”。 停止。
surongfeng@surongfeng:~/gazebo/build$