大家好,欢迎来到IT知识分享网。
由于众所周知的原因,Linux系统更新,开发人员下载安装包,依赖等的时候,慢的出奇,在这里列出一些国内常见的源以及一些配置方法。
常见源:
1. 阿里源:https://opsx.alibaba.com/mirror
2. 清华源:https://mirrors.tuna.tsinghua.edu.cn/
3. 腾讯源:https://mirrors.cloud.tencent.com/
4. 网易源:http://mirrors.163.com/
5. 华为源:https://mirrors.huaweicloud.com
常用源的配置方法
1. Ubuntu配置
打开/etc/apt/sources.list
替换默认的http://archive.ubuntu.com为http://mirrors.aliyun.com
ubuntu 18.04(bionic) 配置如下
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
2. npm or yarn
npm配置方法
npm config set registry https://registry.npm.taobao.org
yarn配置方法
yarn config set registry https://registry.npm.taobao.org
测试配置是否成功
# npm 测试 npm config get registry # yarn 测试 yarn config get registry # 返回此内容说明配置成功 https://registry.npm.taobao.org
3. pypi配置
linux配置路径:~/.pip/pip.conf
windows配置路径:%HOMEPATH%\pip\pip.ini
添加或修改:
[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/116504.html