can't run roscore 并且 sudo 指令返回 unable to 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.
can't run roscore 并且 sudo 指令返回 unable to resolve host的更多相关文章
- sudo 命令报 unable to resolve host 导致反应速度变慢
1 分析 1.1 字面分析,不能解析主机 1.2 由于修改了本地主机名称所导致 2 解决 2.1 打开 /etc/hosts 2.2 主机名称指向,如你的主机名为 debian 2.3 127.0. ...
- sudo之后出现“unable to resolve host ××××”
对主机IP反解即可 打开 /etc/hosts 文件, 在 127.0.0.1 localhost 那行的后面添加你自己的主机名就好啦
- 一组相关联的问题:“sudo: unable to resolve host ###: Connection timed out”、软件启动速度超慢、IPv6无法使用
造冰箱的大熊猫@cnblogs 2018/9/15 近日陆续发现计算机出现几个问题,最终发现这些问题实际上是由同一个原因导致的 问题1:无法使用IPv6 问题2:无论是启动Emacs GUI还是在命令 ...
- sudo 出现unable to resolve host 解决方法
inux 环境, 假设这台机器名字叫dev(机器的hostname), 每次执行sudo 就出现这个警告讯息:sudo: unable to resolve host dev虽然sudo 还是可以正常 ...
- sudo: unable to resolve host xxx解决办法
问题: root@wiki:~# sudo lsb_release -a sudo: unable to resolve host wiki No LSB modules are available. ...
- [待解决] sudo unable to resolve host
怪哉怪哉, 大debian突然就出现了这个问题 , 问题的现象是只要使用 sudo 执行命令就会出现 sudo unable to resolve host </etc/hostname中的内容 ...
- sudo: unable to resolve host XXX 解决方法
执行sudo命令时候,总是提示sudo: unable to resolve host xxx 解决方法: 法1. 在/etc/hosts/添加hosts映射, 如127.0.0.1 xxx 法2. ...
- Ubuntu 报错 sudo: unable to resolve host
Ubuntu 在每次执行命令的时候,会报如下错误: $ sudo sudo: unable to resolve host iZ2zecsdy8flu603bmdg1bZ iZ2zecsdy8flu6 ...
- ubuntu下使用sudo 出现unable to resolve host 解决方法
Linux 环境, 假设这台机器名字叫dev(机器的hostname), 每次执行sudo 就出现这个警告讯息:sudo: unable to resolve host dev虽然sudo 还是可以正 ...
随机推荐
- 说说Makefile那些事儿
说说Makefile那些事儿 |扬说|透过现象看本质 工作至今,一直对Makefile半知半解.突然某天幡然醒悟,觉得此举极为不妥,只得洗心革面从头学来,以前许多不明觉厉之处顿时茅塞顿开,想想好记性不 ...
- 逆天Kali带你游遍大江南北~安全之前人铺路!
0.Linux基础学习(基本指令) http://www.cnblogs.com/dunitian/p/4822807.html 1.Kali安装到移动硬盘或者U盘中~Linux系列通用方法(包括An ...
- OpenSceneGraph in ActiveX by ActiveQt
OpenSceneGraph in ActiveX by ActiveQt eryar@163.com Abstract. Qt’s ActiveX and COM support allows Qt ...
- 初步了解nodejs
什么是Node.js? 很多初学者并没有真正地理解Node.js到底是什么.nodejs.org网站中的描述也没有多大帮助. 首先要清楚Node不是一个Web服务器,这十分重要.它本身并不能做任何事情 ...
- 运用php做投票题,例题
要求大概是这样的,有一个题目,题目下面是复选框,要求点完复选框提交后会变成进度条,各选项的进度条百分比,和投票数量 首先还是要在数据库建两张表,如下: 要完成这个题目,需要建两个页面 <!DOC ...
- Xamarin+Prism小试牛刀:定制跨平台Outlook邮箱应用(后续)
在[Xamarin+Prism小试牛刀:定制跨平台Outlook邮箱应用]里面提到了Microsoft 身份认证,其实这也是一大块需要注意的地方,特作为后续补充这些知识点.上章是使用了Microsof ...
- [数据结构]——链表(list)、队列(queue)和栈(stack)
在前面几篇博文中曾经提到链表(list).队列(queue)和(stack),为了更加系统化,这里统一介绍着三种数据结构及相应实现. 1)链表 首先回想一下基本的数据类型,当需要存储多个相同类型的数据 ...
- java 线程 Lock 锁使用Condition实现线程的等待(await)与通知(signal)
一.Condition 类 在前面我们学习与synchronized锁配合的线程等待(Object.wait)与线程通知(Object.notify),那么对于JDK1.5 的 java.util.c ...
- Visual Studio:error MSB8020(搬运)
状况如下: error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build ...
- NSStringCompareOptions
typedefNS_OPTIONS(NSUInteger, NSStringCompareOptions) { NSCaseInsensitiveSearch = 1, //不区分大小写比较 N ...