CMake Error: The following variables are used in this project, but they are set to NOTFOUND解决办法

在配置px4/Firmware时,编译make时报错:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:

GSTREAMER_LIBRARIES (ADVANCED)
    linked by target "LiftDragPlugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_gst_camera_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_barometer_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_geotagged_images_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_magnetometer_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "sensor_msgs" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_irlock_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_video_stream_widget" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_controller_interface" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_wind_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "std_msgs" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_gps_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_sonar_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "mav_msgs" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "nav_msgs" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_lidar_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_opticalflow_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_mavlink_interface" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_uuv_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_vision_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_multirotor_base_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_imu_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_gimbal_controller_plugin" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "physics_msgs" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo
    linked by target "gazebo_motor_model" in directory /home/sch/catkin_ws/src/Firmware/Tools/sitl_gazebo

-- Configuring incomplete, errors occurred!

解决办法

安装 $ sudo apt-get install libgstreamer-plugins-base1.0-dev

问题拓展

后续还有类似的cmake错误时候,看报错上面的内容,一定存在类似这样的报错,针对性的安装没有找到的依赖就行。

Checking for module 'libopenni2'
--   No package 'libopenni2' found
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
** WARNING ** io features related to openni2 will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled

你可能感兴趣的:(linux)