您现在的位置是: 首页 > 运维 Debian apt 使用国内镜像
Debian apt 使用国内镜像
2020-05-20 【运维】 8186人已围观 16976次浏览
简介Debian apt 使用国内镜像
首先是要找到适合自己当前版本的镜像配置
我这里是用的清华大学开源软件镜像站
如果不知道当前对应的 Debian 版本,可以通过查看默认的 apt 源来判断版本
cat /etc/apt/sources.list
返回内容如下
deb http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian buster-updates main
deb http://security.debian.org/debian-security/ buster/updates main
deb http://ftp.debian.org/debian buster-backports main
可以发现 Debian 版本为 buster ,所以直接选择版本为 buster 即可
因为默认的源是 http 的,但是准备使用的镜像源是 https 的,所以需要额外的安装有关 HTTPS 的包
官网要求的是安装
sudo apt install apt-transport-https
实际上只安装这一个是不够的,会提示下面的报错
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification.
No system certificates available. Try installing ca-certificates.
根据报错和提示信息,发现还需要继续安装 ca-certificates
sudo apt install ca-certificates
以上的包先提前安装,然后备份原始的源的文件,或者是注释掉原有的源,然后在下面新增镜像源,比如
#deb http://deb.debian.org/debian buster main
#deb http://deb.debian.org/debian buster-updates main
#deb http://security.debian.org/debian-security/ buster/updates main
#deb http://ftp.debian.org/debian buster-backports main
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
保存退出,最后更新源,使配置生效
sudo apt update
等待验证,通过后,可以尝试安装之前比较慢的包,试试看效果,可以发现速度有质的提升
很赞哦! (0)
相关文章
- 自建Ngrok服务端
- CentOS 安装 Docker
- 查看MySQL默认读取的配置文件
- Linux 查看磁盘、磁盘分区、挂载磁盘、卸载磁盘操作
- CentOS 安装Node.js
- Redis 提示 MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk 解决方案
- mysql 索引过长1071-max key length is 767 byte
- docker mysql 导入 SQL 脚本
- Linux no space left on device 出现设备上没有空间问题
- CentOS 安装JDK
点击排行
- Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR DISABLE You can't write or read against a disable instance
- Debian apt 使用国内镜像
- RocketMQ 出现 sendDefaultImpl call timeout 问题
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- SpringBoot @NotBlank 不生效问题
- 记一次 Mybatis-Plus 自动填充无效问题解决
- nuxt 项目完整部署方案
- SpringBoot 2.x 文件上传出现 The field file exceeds its maximum permitted size of 1048576 bytes
站长推荐
猜你喜欢
- mac idea spring boot 启动慢
- Mac 设置允许任何来源
- python scrapy 出现 DEBUG: Filtered offsite request to 错误
- 防止Time Machine备份Parallels Desktop的虚拟硬盘文件
- Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR DISABLE You can't write or read against a disable instance
- Vue 路由跳转后不在顶部
- SpringBoot 启动测试时出现提示 Test class should have exactly one public zero-argument constructor
- Linux 查看磁盘、磁盘分区、挂载磁盘、卸载磁盘操作
- 常见端口号
- springboot引入mybatis-plus后出现ClassNotFoundException: org.mybatis.logging.LoggerFactory