PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.21k stars 13.38k forks source link

Could not find a configuration file for package "ignition-common3-graphics" that exactly matches requested version "3.13.2". #17766

Closed kadhirumasankar closed 3 years ago

kadhirumasankar commented 3 years ago

Got the following error when running make px4_sitl gazebo on Ubuntu 20.04:

kumasan@ubuntu:~/PX4-Autopilot$ make clean
/home/kumasan/PX4-Autopilot/build/px4_sitl_default
[1/1] Cleaning all built files...
Cleaning... 186 files.
Entering 'Tools/flightgear_bridge'
Entering 'Tools/jMAVSim'
Entering 'Tools/jsbsim_bridge'
Entering 'Tools/sitl_gazebo'
Entering 'boards/atlflight/cmake_hexagon'
Entering 'mavlink/include/mavlink/v2.0'
Entering 'platforms/nuttx/NuttX/apps'
Entering 'platforms/nuttx/NuttX/nuttx'
Entering 'platforms/qurt/dspal'
Entering 'src/drivers/gps/devices'
Entering 'src/drivers/uavcan/libuavcan'
Entering 'src/drivers/uavcan_v1/legacy_data_types'
Entering 'src/drivers/uavcan_v1/libcanard'
Entering 'src/drivers/uavcan_v1/public_regulated_data_types'
Entering 'src/drivers/uavcannode_gps_demo/libcanard'
Entering 'src/drivers/uavcannode_gps_demo/public_regulated_data_types'
Entering 'src/lib/ecl'
Entering 'src/lib/matrix'
Entering 'src/modules/micrortps_bridge/micro-CDR'
kumasan@ubuntu:~/PX4-Autopilot$ make px4_sitl
[0/809] git submodule src/drivers/gps/devices
[7/809] git submodule src/lib/ecl
[10/809] git submodule mavlink/include/mavlink/v2.0
[809/809] Linking CXX shared library s...s/dyn_hello/examples__dyn_hello.px4mod
kumasan@ubuntu:~/PX4-Autopilot$ make px4_sitl gazebo
[0/11] git submodule Tools/sitl_gazebo
[6/11] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- cmake build type: RelWithDebInfo
-- Using C++17 standard
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.58") found components: system thread filesystem 
-- Found DART: /usr/include (Required is at least version "6.6") found components: dart 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time 
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") 
-- Looking for ignition-math6 -- found version 6.8.0
-- Searching for dependencies of ignition-math6
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Looking for ignition-math6 -- found version 6.8.0
-- Looking for ignition-transport8 -- found version 8.2.0
-- Searching for dependencies of ignition-transport8
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "3") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.3.2
-- Checking for module 'uuid'
--   Found uuid, version 2.34.0
-- Looking for ignition-msgs5 -- found version 5.7.0
-- Searching for dependencies of ignition-msgs5
-- Looking for ignition-math6 -- found version 6.8.0
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.2.0
-- Looking for ignition-msgs5 -- found version 5.7.0
-- Looking for ignition-common3 -- found version 3.13.2
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Searching for <ignition-common3> component [graphics]
CMake Error at /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Could not find a configuration file for package "ignition-common3-graphics"
  that exactly matches requested version "3.13.2".

  The following configuration files were considered but not accepted:

    /usr/lib/x86_64-linux-gnu/cmake/ignition-common3-graphics/ignition-common3-graphics-config.cmake, version: 3.13.1
    /lib/x86_64-linux-gnu/cmake/ignition-common3-graphics/ignition-common3-graphics-config.cmake, version: 3.13.1

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/ignition-common3/ignition-common3-config.cmake:203 (find_dependency)
  /usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:250 (find_package)
  CMakeLists.txt:48 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/kumasan/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
See also "/home/kumasan/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log".
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure 
cd /home/kumasan/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /home/kumasan/PX4-Autopilot/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/kumasan/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
ninja: build stopped: subcommand failed.
make: *** [Makefile:228: px4_sitl] Error 1

I tried to apt install ignition-common3-graphics, but got a message that the package could not be found.

kadhirumasankar commented 3 years ago

Fixed it by following the instructions here, specifically:

sudo apt -y install wget lsb-release gnupg
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt update

# This installs ign-rendering3. Change the number after libignition-rendering to the version you want
sudo apt install libignition-rendering3-dev