在尝试了网上各种解决办法后,发现还是不能解决,最终只能另辟蹊径,使用脚本文件来安装,脚本文件代码如下#!/bin/bash
Bash script for setting up ROS Melodic (with Gazebo 9) development environment for PX4 on Ubuntu LTS (18.04).
It installs the common dependencies for all targets (including Qt Creator)
Installs:
- Common dependencies libraries and tools as defined in ubuntu_sim_common_deps.sh
- ROS Melodic (including Gazebo9)
- MAVROS
if [[ $(lsb_release -sc) == “xenial” ]]; then
echo “OS version detected as $(lsb_release -sc) (16.04).”
echo “ROS Melodic requires at least Ubuntu 18.04.”
echo “Exiting …”
return 1;
fi
echo “Downloading dependent script ‘ubuntu_sim_common_deps.sh’”
Source the ubuntu_sim_common_deps.sh script directly from github
common_deps= ( w g e t h t t p s : / / r a w . g i t h u b u s e r c o n t e n t . c o m / P X 4 / D e v g u i d e / m a s t e r / b u i l d s c r i p t s / u b u n t u s i m c o m m o n d e p s . s h − O − ) w g e t r e t u r n c o d e = (wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_common_deps.sh -O -) wget_return_code= (wgethttps://raw.githubusercontent.com/PX4/Devguide/master/buildscri