当前位置:   article > 正文

UOS换源_uos 更换源

uos 更换源

UOS换源

1、保存源文件

sudo cp -r /etc/apt/sources.list /etc/apt/sources.list.bak
  • 1

2、更换源

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

3、添加公钥

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 3B4FE6ACC0B21F32
  • 1

4、更新

sudo apt update
  • 1

5、更新公钥

sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com
  • 1

6、常见问题

由于出现了 “invalid packet” 的错误消息,可能是由于密钥文件本身的问题导致的。建议您尝试使用以下方法来解决该问题:

  1. 删除 /etc/apt/trusted.gpg​ 文件:
    sudo rm /etc/apt/trusted.gpg
  2. 创建一个新的空白 trusted.gpg​ 文件:
    sudo touch /etc/apt/trusted.gpg
  3. 导入密钥:
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
    注意,将 <KEY>​ 替换为您要导入的密钥的指纹。
  4. 重复步骤3,为每个要导入的密钥重复该步骤。
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/408454
推荐阅读
相关标签
  

闽ICP备14008679号