Loading... ## 一键切换国内源 网站教程:[网站:https://linuxmirrors.cn/](https://linuxmirrors.cn/) 开源:[开源:https://github.com/SuperManito/LinuxMirrors](https://github.com/SuperManito/LinuxMirrors) ```bash bash <(curl -sSL https://linuxmirrors.cn/main.sh) ``` **海外使用:** ```bash bash <(curl -sSL https://linuxmirrors.cn/main.sh) --abroad ``` **一键安装Docker**: ```bash bash <(curl -sSL https://linuxmirrors.cn/docker.sh) ``` ## 一键切换官方源 ```bash cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;echo -e "deb http://deb.debian.org/debian buster main\ndeb-src http://deb.debian.org/debian buster main\ndeb http://security.debian.org/debian-security buster/updates main\ndeb-src http://security.debian.org/debian-security buster/updates main" > /etc/apt/sources.list;cat /etc/apt/sources.list;apt-get update; ``` ### 如果出现问题: 1、`Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'` ```bash apt-get --allow-releaseinfo-change update ``` 2、`GPG error: http://deb.debian.org/debian buster-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131` `E: The repository 'http://deb.debian.org/debian buster-backports InRelease' is not signed.` 说明仓库没有签名,缺PUBKEY,按以下方法解决 ```bash apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUB_KEY1> <PUB_KEY2>…… ``` 比如上面那个就可以这样:`sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131` 3、添加PUBKEY时提示,`gpg: failed to start the dirmngr ``'/usr/bin/dirmngr'``: No such file or directory` 我们只需要在系统上安装dirmngr包 ```bash apt install dirmngr --install-recommends -y ``` 4、如果出现`E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation` 那你还需要先装个gnupg ```bash apt-get install gnupg -y ``` 最后修改:2023 年 11 月 26 日 © 允许规范转载 赞 4 如果觉得我的文章对你有用,请随意赞赏
此处评论已关闭