广告

国内机器Debian9升级Debian12操作步骤

2024-09-19

1.设置软件源

 

cat > /etc/apt/sources.list<<EOF

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

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

deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free

deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free

deb http://archive.debian.org/debian/ stretch-backports main contrib non-free

EOF

 

2.升级Debian 9 现有的软件包

 

apt update && apt upgrade -y

 

3.提示GPG证书问题,NO_PUBLICKEY

 

 

记录PUBULICKEY

 

NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9

 

3.1安装需要的依赖和软件

 

apt-get install software-properties-common dirmngr -y

 

3.2添加gpg证书验证

 

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>

<PUBKEY2>

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 0E98404D386FA1D9

 

 

4.更换debian12的软件源

 

cat >/etc/apt/sources.list<<EOF

deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

EOF

添加公钥

 

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54404762BBB6E853 BDE6D2B9216EC7A8

 

5.更新软件源索引

 

apt update -y

 

在开始升级你现有的 Debian 操作系统前,让我们使用下面的命令验证当前版本

 

cat /etc/*-release

 

 

6.从 Debian 9 升级到 Debian 12

 

apt update && apt upgrade -y

 

7.查看当前版本信息

 

lsb_release -a

 

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。本站原创内容未经允许不得转载,或转载时需注明出处!

上一篇:Centos7.6如何用arch命令显示当前主机的硬件架构类型

下一篇:Debian如何安装htop查看资源占用情况

这条帮助是否解决了您的问题?已解决未解决

提交成功!非常感谢您的反馈,我们会继续努力做到更好!很抱歉未能解决您的疑问。我们已收到您的反馈意见,同时会及时作出反馈处理!

立即注册91VPS账号,免费体验多款产品
立即注册
联系我们
全国咨询热线:
0712-5319406
QQ客服:
800193021
91VPS微信客服

扫码联系微信客服