linux把库添加到系统,将Debian 10 Buster官方存储库添加到sources.list的方法

从DVD安装Debian 10后,我的系统无法更新或安装任何软件包,因为sources.list将DVD安装存储称为软件包存储库,我不得不手动更新sources.list文件,其中包含可以从中下载程序包的URL和安全更新位置的正确URL列表。在本文中,我们介绍将官方Debian 10 apt存储库添加到sources.list文件中的方法。要了解该系统版本新功能,请参考:Debian 10 Buster的主要新功能/新特性介绍。

c7b9c8abbfba0975df637e1918492d7a.png

旧文件

运行:$ cat /etc/apt/sources.list

# deb cdrom:[Debian GNU/Linux testing _Buster_ - Official Snapshot amd64 DVD Binary-1 20190527-04:04]/ buster contrib main

deb cdrom:[Debian GNU/Linux testing _Buster_ - Official Snapshot amd64 DVD Binary-1 20190527-04:04]/ buster contrib main

deb http://security.debian.org/debian-security buster/updates main contrib

deb-src http://security.debian.org/debian-security buster/updates main contrib

将Debian 10 Buster官方存储库添加到sources.list的方法

将/etc/apt/sources.list文件更新为如下所示,即用以下文件内容替代原来旧文件内容:

deb http://deb.debian.org/debian buster main contrib non-free

deb-src http://deb.debian.org/debian buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib

deb-src http://security.debian.org/debian-security buster/updates main contrib

/etc/apt/sources.list新文件见下面的截图:

698cda5ea02c34dceb8bd14684612090.png

完成后,更新你的APT索引,运行sudo apt update命令,如下:

$ sudo apt update

Hit:1 http://security.debian.org/debian-security buster/updates InRelease

Hit:2 http://deb.debian.org/debian buster InRelease

Reading package lists... Done

Building dependency tree

Reading state information... Done

63 packages can be upgraded. Run 'apt list --upgradable' to see them.

升级你的系统包:

sudo apt upgrade -y

尝试安装其他软件包,例如:

sudo apt install bash-completion wget curl vim telnet -y

至此,sources.list包含的是Debian 10 Buster官方存储库。

TAG:

除非注明,文章均由 Linux系统学习 整理发布,欢迎转载。如有版权争议,请联系删除。

文章评论

留言与评论(共有 0 条评论)

验证码:

b2afe5d1fe9f478fafeb0d6ac357ee2a.png

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值