![由于源中的条目格式不正确,无法安装 ROS(Ubuntu 18.04 LTS)](https://linux22.com/image/1194554/%E7%94%B1%E4%BA%8E%E6%BA%90%E4%B8%AD%E7%9A%84%E6%9D%A1%E7%9B%AE%E6%A0%BC%E5%BC%8F%E4%B8%8D%E6%AD%A3%E7%A1%AE%EF%BC%8C%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20ROS%EF%BC%88Ubuntu%2018.04%20LTS%EF%BC%89.png)
我正在尝试安装 ROS,但无法安装,因为:
E: Malformed entry 1 in list file /etc/apt/sources.list.d/ros-latest.list (Suite)
E: The list of sources could not be read.
我该怎么办?
历史:
1 sudo apt update
2 sudo apt upgrade
3 sudo apt update
4 sudo apt install bpython
5 bpython
6 sudo apt install x11-apps
7 xeyes &
8 xcalc
9 sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
10 sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu
11 (lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
12 sudo apt install curl # if you haven't already installed curl
13 sudo apt install curl
14 sudo apt update
15 sudo apt install ros-melodic-desktop-full
16 cat /etc/apt/sources.list.d/ros-latest.list
17 sudo add-apt-repository universe
18 sudo add-apt-repository multiverse
19 sudo apt update
20 sudo add-apt-repository universe
21 /etc/apt/sources.list.d/ros-latest.list
22 history
请求 1:
cat /etc/apt/sources.list.d/ros-latest.list
deb http://packages.ros.org/ros/ubuntu
(lsb_release -sc) main
答案1
.list
文件中的这些行
deb http://packages.ros.org/ros/ubuntu
(lsb_release -sc) main
应该是这样的一行
deb http://packages.ros.org/ros/ubuntu bionic main