ubuntu如何更换国内源

您所在的位置:网站首页 ubuntu20更换下载源 ubuntu如何更换国内源

ubuntu如何更换国内源

2023-03-10 20:53| 来源: 网络整理| 查看: 265

ubuntu如何更换国内源_ubuntu20更换国内源 思创斯忠实用户-ss • 2023年3月10日 08:00 • 未分类

ubuntu如何更换国内源_ubuntu20更换国内源ubuntu更换国内源安装好ubuntu系统后,默认的软件更新源是国外的,在国内使用速度很慢,用”aptinstallxxx”安装软件时可能出现”网络不可达”、”你的网络需要认证吗”、”无法定位软件包”等错误,所以我们需要更换成国内的源,这样才能正常安装和更新软件。1.备份原始源文件source.list桌面打开终端,执行命令:sudocp/etc/apt/sources.list/etc/apt/sources.list.bak2.查看对应Linux版本的软件源镜.

大家好,我是你的好朋友思创斯。今天说一说ubuntu如何更换国内源_ubuntu20更换国内源,希望您对编程的造诣更进一步.

ubuntu  更换国内源

安装好ubuntu系统后,默认的软件更新源是国外的,在国内使用速度很慢,用”apt install xxx”安装软件时可能出现”网络不可达”、”你的网络需要认证吗”、”无法定位软件包”等错误,所以我们需要更换成国内的源,这样才能正常安装和更新软件。

1.备份原始源文件source.list

桌面打开终端,执行命令:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 2.查看对应Linux版本的软件源镜 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 2.修改源文件sources.list 打开/etc/apt/sources.list文件,在前面添加如下条目,并保存; sudo gedit /etc/apt/sources.list  删除原来的文件内容,复制【软件源镜像】到其中并保存; # Linux20.04: # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse # Linux18.04: # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse 3.更新源 sudo apt-get update 4.如出现依赖问题,解决方式如下: sudo apt-get -f install 5.更新软件: sudo apt-get upgrade 版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由思创斯整理,转载请注明出处:https://ispacesoft.com/102960.html

赞 (0) 思创斯忠实用户-ss思创斯忠实用户-ss 0 0 生成海报


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3