如何配置Debian 10的APT源?

Debian-Like

1 前言

最近笔者需要使用Debian系统,发现阿里云还没有更新Debian 10的源配置,于是只能自己写一份,此文用于存档与分享配置。

2 最佳实践

2.1 修改原配置文件

vi /etc/apt/sources.list

配置修改如下,

deb http://mirrors.aliyun.com/debian/ buster main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster main contrib non-free

deb http://mirrors.aliyun.com/debian-security  buster/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security  buster/updates main contrib non-free

deb http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free

deb http://mirrors.aliyun.com/debian/ buster-backports main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster-backports main contrib non-free

deb http://mirrors.aliyun.com/debian/ buster-proposed-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster-proposed-updates main contrib non-free

2.2 更新源缓存

apt update

可见如下显示,

Hit:1 http://debian.sae.com.hk/debian buster InRelease
Hit:2 http://debian.sae.com.hk/debian-security buster/updates InRelease
Hit:3 http://debian.sae.com.hk/debian buster-updates InRelease
Hit:4 http://debian.sae.com.hk/debian buster-backports InRelease
Hit:5 http://debian.sae.com.hk/debian buster-proposed-updates InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

2.3 查找软件包

apt search vim

可见如下提示,

Sorting... Done
Full Text Search... Done
[...]
vim/stable,now 2:8.1.0875-5 amd64 [installed]
  Vi IMproved - enhanced vi editor
[...]

2.4 安装软件包

apt install vim

可见如下提示,

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,280 kB of archives.
After this operation, 2,867 kB of additional disk space will be used.
Get:1 http://debian.sae.com.hk/debian buster/main amd64 vim amd64 2:8.1.0875-5 [1,280 kB]
Fetched 1,280 kB in 1s (1,490 kB/s)
Selecting previously unselected package vim.
(Reading database ... 29393 files and directories currently installed.)
Preparing to unpack .../vim_2%3a8.1.0875-5_amd64.deb ...
Unpacking vim (2:8.1.0875-5) ...
Setting up vim (2:8.1.0875-5) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode

doc
=================
https://developer.aliyun.com/mirror/debian

https://zhuanlan.zhihu.com/p/391210581

没有评论

发表评论

Debian-Like
如何编译安装Debian tigervnc?

1 前言 一个问题,一篇文章,一出故事。 笔者使用默认安装的Debian Tigervnc感觉不够完 …

Debian-Like
如何安装Debian 11抓屏tigervnc?

1 前言 一个问题,一篇文章,一出故事。 笔者需要查看远程Debian的远程电脑操作屏幕,于是安装非 …

Debian-Like
如何安装Debian 11标准tigervnc?

1 前言 一个问题,一篇文章,一出故事。 笔者需要远程Debian的远程电脑,于是安装标准版本的VN …