ubuntu sources.list格式 换源 常见错误

首先参考:https://blog.csdn.net/u012843189/article/details/80964287

sources.list格式:

deb: 二进制包仓库
deb-src: 二进制包的源码库
URI:库所在的地址,可以是网络地址,也可以是本地的镜像地址
codename: Ubuntu版本的代号。可以用命令lsb_release -sc来查看当前系统的代号;一定要和当前系统版本代号匹配上
components: 软件的性质(free或non-free等)

eg:

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse

deb: deb
URI:https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
codename: bionic
components: main restricted universe multiverse

常见错误:

(1)ubuntu版本错误

用命令lsb_release -sc来查看当前系统,替换源中的所有codename字段

(2)AMD处理器换源失败

添加处理器架构,对于64位AMD CPU,添加[arch=amd64]

eg:deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse

(3)AppStream system cache was updated, but problems were found: Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml

执行命令:

rm /var/cache/app-info/xmls/fwupd.xml
sudo appstreamcli refresh --force

然后从新:

sudo apt update

sudo apt upgrade

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值