本教程风险极大,请不要轻易尝试。当然此篇方法适用于任何想从Ubuntu 16.04升级到18.04(10年超长期支持)的用户。
----过程如下::----
tianbot@ros2go:~$ sudo apt update
tianbot@ros2go:~$ sudo apt upgrade
tianbot@ros2go:~$ sudo apt install -f
tianbot@ros2go:~$ sudo apt install update-manager
tianbot@ros2go:~$ sudo apt install update-manager-core
tianbot@ros2go:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
----
tianbot@ros2go:~$ sudo do-release-upgrade
----
回车后就没有回头路了!!!后来失败了!!!
失败!Command terminated with exit status 1
那么换一个方式试一下???
tianbot@ros2go:~$ sudo update-manager -cd
额,依然不行呢,看看为什么吧?
tianbot@ros2go:~$ grep Broken /var/log/dist-upgrade/apt.log
好像问题特别多哎
If you added non-Ubuntu sources, you might need to uninstall those non-Ubuntu packages. Sometimes the files they provide are different (file conflict), or their version number is confusing (version conflict).
上面就是问题的根源所在。
忍着痛,先把Kinetic版本ROS卸载了,然后就可以了。
tianbot@ros2go:~$ sudo do-release-upgrade -d
y+Enter
下载完成后,会继续安装更新~
耐心等待升级完成,结束后,重启即可,由于全部采取默认设置,用户名是tianbot。
然后安装ROS 1、2和V-Rep等软件即可~
具体可以参考:
https://blog.csdn.net/ZhangRelay/column/info/28058
升级完成。
这里还需要补充一下呢,由于升级导致功能包库会有些问题,这时候需要手动更新并安装即可。
比如需要Mac主题,可以使用:noobslab。
注意看,这里有很多16.04(xenial),如果升级完成没有问题,可以替换为18.04(bionic)版本的。
打开终端,会发现:
修改.bashrc,将kinetic换成melodic即可:source /opt/ros/melodic/setup.bash
启动roscore和turtlesim测试一下:
ROS indigo kinetic melodic的教程几乎全部通用。
Upgraded Ubuntu 18.04 suddenly boots slowly?
www.dedoimedo.com/computers/ubuntu-beaver-slow-boot.html
----
Fin
----