怎么安装清华大学镜像站的中继镜像源
时间: 2024-01-21 21:09:18 浏览: 105
您可以按照以下步骤进行安装:
1. 打开终端,输入以下命令以备份原有的源列表:
`sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak`
2. 替换源列表为清华大学镜像站提供的源列表。运行以下命令将清华大学镜像站的源列表写入`/etc/apt/sources.list`:
`echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse\ndeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse\ndeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse\ndeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse\ndeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse\ndeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse\ndeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse\ndeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse\n" | sudo tee /etc/apt/sources.list`
3. 运行以下命令获取清华大学镜像站的 GPG 密钥:
`sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5`
4. 运行以下命令更新软件包列表:
`sudo apt update`
现在,您就可以使用清华大学镜像站的中继镜像源了。
阅读全文