can't run roscore 并且 sudo 指令返回 unable to resolve host
- 作者: 五速梦信息网
- 时间: 2026年04月04日 13:48
I'm using ubuntu14 LTS.
Problems:
1. When run roscore, got a mistake and an advice to ping the localhost.
2. Nearly every time I run a directive with sudo, I got a warning that unable to resolve host.
It turns out, the reason is I changed the ubuntu computer name some while ago.
Solutions: (must following this order)
1. edit ~/etc/hosts
Navigate to the file locaiton, and type 'sudo nautilus .' in the terminal.
You will see these two lines at the beginning of the file:
127.0.0.1 localhost
127.0.1.1 "here is your old computer name, which you think you have changed but not" -> change it to the current computer name.
This should solve problem 2.
2. edit ~/.bashrc
type 'gedit ~/.bashrc' in the terminal, and add the following two lines at the end of the file:
export ROS_HOSTNAME="put your current computer name here"
export ROS_MASTER_URI=http://"put your current computer name here":11311
This should solve problem 1.
- 上一篇: canvas 自身坐标系
- 下一篇: canal 集群搭建 instance 挂载到集群下启动不了
相关文章
-
canvas 自身坐标系
canvas 自身坐标系
- 互联网
- 2026年04月04日
-
canvas判断进入某个区域
canvas判断进入某个区域
- 互联网
- 2026年04月04日
-
canvas与html5实现视频截图功能
canvas与html5实现视频截图功能
- 互联网
- 2026年04月04日
-
canal 集群搭建 instance 挂载到集群下启动不了
canal 集群搭建 instance 挂载到集群下启动不了
- 互联网
- 2026年04月04日
-
camtasia怎么添加画中画
camtasia怎么添加画中画
- 互联网
- 2026年04月04日
-
CAD实现文档坐标到视区坐标的转换(com接口Delphi语言)
CAD实现文档坐标到视区坐标的转换(com接口Delphi语言)
- 互联网
- 2026年04月04日






