ros安装踩坑

5 篇文章 1 订阅

ROS安装方法见:https://blog.csdn.net/W_X_123/article/details/88629047在这里插入图片描述

Permission denied

$sudo chmod -R 777 ros_ws

-R 是指级联应用到目录里的所有子目录和文件
777 是所有用户都拥有最高权限

Ubuntu每次启动都显示System program problem detected的解决办法

 sudo gedit /etc/default/apport 
  • enabled=0

Ubuntu Server 16.04修改DNS

sudo gedit /etc/resolvconf/resolv.conf
  • nameserver 8.8.8.8 #希望修改成的DNS
  • nameserver 114.114.114.114 #希望修改成的DNS
  • 保存退出,重启网络:
sudo /etc/init.d/networking restart

查看当前DNS:

cat /etc/resolv.conf
  • Ubuntu下修改为永久DNS的方法

安装好Ubuntu之后设置了静态IP地址,再重启后就无法解析域名。想重新设置一下DNS,打开/etc/resolv.conf

cat /etc/resolv.conf

Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN

内容是一段警告:说这个文件是resolvconf程序动态创建的,不要直接手动编辑,修改将被覆盖。

果不其然,修改后重启就失效了,搜索了Ubuntu下设置DNS的相关资料,总结出办法:

通过/etc/network/interfaces,在它的最后增加一句:

dns-nameservers 8.8.8.8 复制就好,很多人拼写错误

公钥错误

W: GPG 错误:http://mirrors.ustc.edu.cn/ros/ubuntu xenial InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654
W: 仓库 “http://mirrors.ustc.edu.cn/ros/ubuntu xenial InRelease” 没有数字签名。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

解决办法

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654

ERROR: cannot download default sources list from:https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down.

解决办法

  • 参考
    http://www.liuxiao.org/2017/12/ros-%E5%9C%A8-ubuntu-16-04-%E7%B3%BB%E7%BB%9F%E4%B8%8A%E5%AE%89%E8%A3%85-ros-kinetic/
l@l-Default-string:~$ sudo rosdep init
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
l@l-Default-string:~$ sudo apt-get install ca-certificates
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
ca-certificates 已经是最新版 (20170717~16.04.2)。
下列软件包是自动安装的并且现在不需要了:
  snapd-login-service
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
l@l-Default-string:~$ sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
l@l-Default-string:~$ sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
l@l-Default-string:~$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

Executing: /tmp/tmp.6bc6UegXGo/gpg.1.sh --keyserver
hkp://ha.pool.sks-keyservers.net:80
--recv-key
421C365BD9FF1F717815A3895523BAEEB01FA116
gpg: 下载密钥‘B01FA116’,从 hkp 服务器 ha.pool.sks-keyservers.net
gpg: 密钥 B01FA116:“ROS Builder <rosbuild@ros.org>”未改变
gpg: 合计被处理的数量:1
gpg:              未改变:1
l@l-Default-string:~$ 
l@l-Default-string:~$ 1
1:未找到命令
l@l-Default-string:~$ 
l@l-Default-string:~$ sudo apt-get update
命中:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
命中:2 http://packages.microsoft.com/repos/vscode stable InRelease
命中:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease
命中:4 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease
命中:5 http://mirrors.aliyun.com/ubuntu xenial-security InRelease
命中:6 http://archive.canonical.com/ubuntu xenial InRelease
命中:7 http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease
命中:8 http://mirrors.ustc.edu.cn/ros/ubuntu xenial InRelease
正在读取软件包列表... 完成
W: 目标 Packages (main/binary-amd64/Packages)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Packages (main/binary-i386/Packages)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Packages (main/binary-all/Packages)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-zh_CN)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-zh)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-en_US)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-en)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 DEP-11 (main/dep11/Components-amd64.yml)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 DEP-11-icons (main/dep11/icons-64x64.tar)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Packages (main/binary-amd64/Packages)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Packages (main/binary-i386/Packages)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Packages (main/binary-all/Packages)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-zh_CN)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-zh)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-en_US)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 Translations (main/i18n/Translation-en)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 DEP-11 (main/dep11/Components-amd64.yml)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
W: 目标 DEP-11-icons (main/dep11/icons-64x64.tar)/etc/apt/sources.list:13/etc/apt/sources.list.d/ros-latest.list:1 中被配置了多次
l@l-Default-string:~$ sudo apt-get upgrade、
E: 无效的操作 upgrade、
l@l-Default-string:~$ sudo apt-get upgrade
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在计算更新... 完成
下列软件包是自动安装的并且现在不需要了:
  snapd-login-service
使用'sudo apt autoremove'来卸载它(它们)。
下列软件包的版本将保持不变:
  linux-generic-hwe-16.04 linux-headers-generic-hwe-16.04
  linux-image-generic-hwe-16.04 ubuntu-minimal
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
l@l-Default-string:~$ sudo apt-get install ros-kinetic-desktop-full
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
ros-kinetic-desktop-full 已经是最新版 (1.3.2-0xenial-20190608-170201-0800)。
下列软件包是自动安装的并且现在不需要了:
  snapd-login-service
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
l@l-Default-string:~$ sudo rosdep init
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run

	rosdep update

l@l-Default-string:~$ 

Linux安装libpcap(pcap.h库)(以Ubuntu 18.04为例)

https://blog.csdn.net/qq_30902647/article/details/86776612

sudo apt-get update
sudo apt-get install flex bison byacc 
  • 接下来进入libpcap源码目录
./configure
make
sudo make install

Ubuntu 安装后,root用户默认被锁定,不允许登录,也不允许“su”到 root。对于桌面用户来说,这样安全性更高一些,但对于服务器可以设置成“允许 su 到root,但不允许root用户直接登录”。为了开发时的方便,我们常希望都采用这种方式,那么我们应该怎么办呢?请参考本文讨论的方法与建议


1、允许 su 到 root

非常简单,下面是设置的方法:

~$ sudo passwd 
Password: <--- 输入安装时那个用户的密码 
Enter new UNIX password: <--- 新的Root用户密码 
Retype new UNIX password: <--- 重复新的Root用户密码 
passwd:已成功更新密码 

文件拷贝指令

cp 文件名 目标路径(拷贝一个文件到目标路径,如cp libusbcan.so /lib)
拷贝文件到lib

E: Problem executing scripts APT::Update::Post-Invoke-Success

E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi’
E: Sub-process returned an error code

$ sudo pkill -KILL appstreamcli
$ wget -P /tmp https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
$ sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb

W: There is no public key available for the following key IDs: 871920D1991BC93C

$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 871920D1991BC93C
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值