设为首页 加入收藏

TOP

can't run roscore 并且 sudo 指令返回 unable to resolve host
2017-10-13 10:32:52 】 浏览:4175
Tags:can' run roscore 并且 sudo 指令 返回 unable resolve host

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.

  

 

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇linux-图形化远程管理协议 下一篇RedHat 7.0 Chrome浏览器 安装

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目