debain国内源很多,我最常用的就是清华源,清华源网上一搜就有很多,我之所以还写这篇笔记是为了记录一下过早的系统中过内源已经没有的情况下如何安装和更新软件。
此处记录debain8-11。
版本号 | 代号 | 8 | jessie | 9 | stretch | 10 | buster | 11 | bullseye |
其中debain8的官方镜像和国内镜像都没有backports了,所以直接按照网上的配置成清华源并不能解决问题。
{ \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ jessie main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ jessie-updates main contrib non-free"; \
echo "deb [check-valid-until=no] http://archive.debian.org/debian/ jessie-backports main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security jessie/updates main contrib non-free"; \
} > /etc/apt/sources.list && \
apt-get -o Acquire::Check-Valid-Until=false update
debain官方将过期的项目都放置在 http://archive.debian.org/debian/ 这个网站,同时更新的时候停用检查过期数字签名的检查即可。
debain9
{ \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free"; \
} > /etc/apt/sources.list
debain10
{ \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free"; \
} > /etc/apt/sources.list
debain11
{ \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free"; \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free"; \
} > /etc/apt/sources.list
|