树莓派安装Ubuntu和WIFI配置

树莓派安装与配置

上午用Ubuntu Mate 22.04安装了树莓派,也就是官网提供的最新的

在这里插入图片描述

SD卡重新烧录后显示屏一开始是有图形界面的,之前陆辉东安装的不知道为什么一直没有

所以今天上午刚拿到的3.5寸电阻屏明天又要退回去了,用还没有用,以后直接ssh远程登录就好

但是有一个问题,22.04版本的Ubuntu不知道要安装什么版本的ROS,网上有说书ROS2,已经不支持ROS1,吓得我赶紧格式化SD卡

在下面的网址可以下载一些旧版本的Ubuntu Mate

https://ubuntu-mate.community/t/download-old-releases-of-ubuntu-mate/19426

我一共下了这些

在这里插入图片描述

我先试了20.10-desktop,顺利安装,有图形化界面,但是在安装ROS-Noetic的时候出了问题,应该是不兼容的原因,于是我又试了18.04.2-desktop16.04-desktop,同样在那个网址下下载的,但是根本安装不了,最后SD卡好像都被我干坏了,唉,浪费了几乎一下午时间

主要实在是找不到18.04-desktop的镜像,网上一大堆乱七八糟文章互相抄

不过总算有一篇好文章,讲得很好,用18.04-server可以顺利安装

树莓派4b安装Ubuntu和ROS的完整爬坑记录——2021年6月25日

按他的步骤做基本不会遇到什么问题

我遇到一个细节问题

配置无线网应该是这样:

# This file contains a netplan-compatible configuration which cloud-init
# will apply on first-boot. Please refer to the cloud-init documentation and
# the netplan reference for full details:
#
# https://cloudinit.readthedocs.io/
# https://netplan.io/reference
#
# Some additional examples are commented out below

version: 2
ethernets:
  eth0:
    dhcp4: true
    optional: true
wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
      "my_rpi4b":
        password: "88888888"
#      myotherlan:
#        password: "correct battery horse staple"
#      workssid:
#        auth:
#          key-management: eap
#          method: peap
#          identity: "me@example.com"
#          password: "passw0rd"
#          ca-certificate: /etc/my_ca.pem

但我多注释了一句

# This file contains a netplan-compatible configuration which cloud-init
# will apply on first-boot. Please refer to the cloud-init documentation and
# the netplan reference for full details:
#
# https://cloudinit.readthedocs.io/
# https://netplan.io/reference
#
# Some additional examples are commented out below

version: 2
ethernets:
  eth0:
    dhcp4: true
    optional: true
wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
      "my_rpi4b":
#       password: "88888888"
#      myotherlan:
#        password: "correct battery horse staple"
#      workssid:
#        auth:
#          key-management: eap
#          method: peap
#          identity: "me@example.com"
#          password: "passw0rd"
#          ca-certificate: /etc/my_ca.pem

就导致我ifconfig后只有lo,即本地回环,ping百度当然也不会ping

ping百度的时候还会报域名无法解析的错误

就这两个问题我搜了各种解决方法,一顿折腾,思考可能是无线网没设置好的问题

通过下面的博客配置WIFI连接

02.树莓派-ubuntu server初始化配置

正常应该是这样

network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    wifis:
        wlan0:
            dhcp4: true
            optional: true
            access-points:
                "xxxWIFI1":
                     password: "1234567890"

    version: 2

但我的差不多这样

network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    wifis:
        wlan0:
            dhcp4: true
            optional: true
            access-points:
                "xxxWIFI1": null

    version: 2

这才发现我的无线网密码没设置,转而检查network-config文件,才发现多注释一句,白白浪费那么多时间

💡 操作的时候一定要细心啊!

  • 11
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Prejudices

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值