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的更多相关文章

  1. sudo 命令报 unable to resolve host 导致反应速度变慢

    1 分析 1.1 字面分析,不能解析主机 1.2 由于修改了本地主机名称所导致 2 解决 2.1 打开 /etc/hosts 2.2 主机名称指向,如你的主机名为 debian 2.3  127.0. ...

  2. sudo之后出现“unable to resolve host ××××”

    对主机IP反解即可 打开 /etc/hosts 文件, 在 127.0.0.1 localhost 那行的后面添加你自己的主机名就好啦

  3. 一组相关联的问题:“sudo: unable to resolve host ###: Connection timed out”、软件启动速度超慢、IPv6无法使用

    造冰箱的大熊猫@cnblogs 2018/9/15 近日陆续发现计算机出现几个问题,最终发现这些问题实际上是由同一个原因导致的 问题1:无法使用IPv6 问题2:无论是启动Emacs GUI还是在命令 ...

  4. sudo 出现unable to resolve host 解决方法

    inux 环境, 假设这台机器名字叫dev(机器的hostname), 每次执行sudo 就出现这个警告讯息:sudo: unable to resolve host dev虽然sudo 还是可以正常 ...

  5. sudo: unable to resolve host xxx解决办法

    问题: root@wiki:~# sudo lsb_release -a sudo: unable to resolve host wiki No LSB modules are available. ...

  6. [待解决] sudo unable to resolve host

    怪哉怪哉, 大debian突然就出现了这个问题 , 问题的现象是只要使用 sudo 执行命令就会出现 sudo unable to resolve host </etc/hostname中的内容 ...

  7. sudo: unable to resolve host XXX 解决方法

    执行sudo命令时候,总是提示sudo: unable to resolve host xxx 解决方法: 法1. 在/etc/hosts/添加hosts映射, 如127.0.0.1 xxx 法2. ...

  8. Ubuntu 报错 sudo: unable to resolve host

    Ubuntu 在每次执行命令的时候,会报如下错误: $ sudo sudo: unable to resolve host iZ2zecsdy8flu603bmdg1bZ iZ2zecsdy8flu6 ...

  9. ubuntu下使用sudo 出现unable to resolve host 解决方法

    Linux 环境, 假设这台机器名字叫dev(机器的hostname), 每次执行sudo 就出现这个警告讯息:sudo: unable to resolve host dev虽然sudo 还是可以正 ...

随机推荐

  1. nodejs进阶(2)—函数模块调用

    函数调用 1. 文件内普通函数调用 创建一个js文件命名为2_callFunction.js,其中定义一个函数fun1,向返回对象输出了一段字符串“你好,我是fun1”. //------------ ...

  2. jQuery学习之路(5)- 简单的表单应用

    ▓▓▓▓▓▓ 大致介绍 接下来的这几个博客是对前面所学知识的一个简单的应用,来加深理解 ▓▓▓▓▓▓ 单行文本框 只介绍一个简单的样式:获取和失去焦点改变样式 基本结构: <form actio ...

  3. Entity Framework 教程——DBContext

    DBContext: 在之前的章节<创建实体数据模型>中,EDM为我们创建了SchoolDBEntities 类,它派生子System.Data.Entity.DbContext这个类,这 ...

  4. Autofac - 生命周期

    实例生命周期决定在同一个服务的每个请求的实例是如何共享的. 当请求一个服务的时候,Autofac会返回一个单例 (single instance作用域), 一个新的对象 (per lifetime作用 ...

  5. UML图中经常用到几种的关系图例

    学习这个东西挺奇怪的,时间一长就容易忘记,或者记不清楚.今天看到一些UML图的关系,发现有些出入了,索性就写下来,以后再忘记的时候过来看看. 在UML的类图中,常见的有以下几种关系: 继承(Gener ...

  6. Javascript 严格模式详解

    转自http://www.ruanyifeng.com/blog/2013/01/javascript_strict_mode.html 一.概述 除了正常运行模式,ECMAscript 5添加了第二 ...

  7. iosselect:一个js picker项目,在H5中实现IOS的select下拉框效果

    具体文档和demo可以访问github:https://github.com/zhoushengmufc/iosselect 移动端浏览器对于select的展示样式是不一致的,ios下是类似原生的pi ...

  8. BPM配置故事之案例3-参与者与数据自动加载

    这才过了两天,阿海又来了. 阿海:公司决定改进管理方式,以后物资申请的申请人和申请部门要写具体使用人的名字和部门了. 小明:不是要让我改回去吧? 阿海:那太麻烦了,你能不能把申请人改成选择,选好人自动 ...

  9. mac好用的markdown编辑器

    在刚开始接触markdown的时候,就被吸引了.此后一直在找贴心的好用的markdown编辑器.印象笔记和马克飞象配合着用也是挺好的,唯一的缺点就是比较封闭,发个笔记的链接给同学,还得注册才能看,导致 ...

  10. ORACLE中STATUS为INACTIVE但是SERVER为SHARED状态的会话浅析

    我们知道当ORACLE数据库启用共享服务器模式时,通过共享服务器模式连接到数据库的会话是有一些特征的.在v$session里面,其SERVER的状态一般为SHARED和NONE, 为SHARED时,表 ...