双系统安装ubuntu

1.注意版本对应,18.4的Ubuntu对应ROS版本ros-melodic-desktop-full

直接在老师的其他版本安装方法就有了😇😇以下为苯人错误尝试

2.配置环境变量

3.构建依赖

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

第二个命令显示bash: /opt/ros/noetic/setup.bash: 没有那个文件或目录

因为之前在设置bash终端时,执行了命令:

source  /opt/ros/noetic/setup.bash

#解決方法: 在终端输入

gedit ~/.bashrc

#在打开文件的最后找到bash: /opt/ros/版本/setup.bash 删除重复的多余配置,如果没有多余项查看这句话拼写是否正确,或者与你的ros版本相称

错误方法:

打开Ubuntu终端,输入命令:

sudo  vi  ~/.bashrc

编辑这个文件,找到/opt/ros/noetic/setup.bash

打开的不是文本编辑器,编辑功能好怪

4.构建依赖第一步出问题了

 sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
[sudo] coal 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
build-essential 已经是最新版 (12.4ubuntu1)。
build-essential 已设置为手动安装。
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
 python3-rosinstall : 依赖: python3-catkin-pkg 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

因为ros18版本所匹配的是python2,所以直接看老师的文档按步骤就好了😇😇

5.

 rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
ERROR: error loading sources list:
    The read operation timed out

改用热点之后报错

 rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
    <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
    Failed to download target platform data for gbpdistro:
    <urlopen error [Errno 111] Connection refused>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
ERROR: error loading sources list:
    <urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

按老师的方法改出现了警告,但是只是警告没事,可以忽略掉

sudo gedit ./rosdistro/__init__.py
[sudo] coal 的密码:

(gedit:29097): IBUS-WARNING **: 21:34:14.417: The owner of /home/coal/.config/ibus/bus is not root!

(gedit:29097): IBUS-WARNING **: 21:34:14.565: Unable to connect to ibus: 试图读取一行时,异常地缺失内容

** (gedit:29097): WARNING **: 21:35:54.964: Set document metadata failed: 不支持设置属性 metadata::gedit-spell-language

** (gedit:29097): WARNING **: 21:35:54.965: Set document metadata failed: 不支持设置属性 metadata::gedit-encoding

** (gedit:29097): WARNING **: 21:35:56.016: Set document metadata failed: 不支持设置属性 metadata::gedit-posi

然后再改为热点成功了,有时候会是网络问题

 

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值