公告:魔扣目录网为广大站长提供免费收录网站服务,提交前请做好本站友链:【 网站目录:https://www.morko.net 】, 免友链快审服务(50元/站),

点击这里在线咨询客服
新站提交
  • 网站:51998
  • 待审:31
  • 小程序:12
  • 文章:1030137
  • 会员:747

一站配齐所有国内镜像,第三方库安装提升 10 倍

开发过程中,我们经常会用到各种各样的包管理工具,几乎每种包管理工具缺省设置都是从国外服务器下载相应的软件安装包,或者下载很慢,或者干脆无法下载。以下列出我常用的所有国内镜像,方便有类似需求的同学参考 (不定期更新,感觉有用的同学请注意收藏)。

我平常用的 shell是fish,所以下面的语法全都是fish相关的set -x,如果是用缺省的bash,可以替换成export命令。

 

操作系统相关

brew国内镜像

cd /usr/local/Homebrew
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

# brew国内镜像
set -x HOMEBREW_BOTTLE_DOMAIN https://mirrors.ustc.edu.cn/homebrew-bottles

 

JAVAscript相关

npm国内镜像

npm config set registry https://registry.npm.taobao.org/

 

yarn国内镜像

yarn config set registry https://registry.npm.taobao.org/

 

pnpm国内镜像

pnpm config set registry https://registry.npm.taobao.org/

 

electron国内镜像

set -x ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/

 

node-sass国内镜像

set -x SASS_BINARY_SITE https://npm.taobao.org/mirrors/node-sass/

 

fsevents国内镜像

set -x FSE_BINARY_HOST_MIRROR https://npm.taobao.org/mirrors/fsevents/

 

更多

更多设置,或者懒得一个一个设置的同学也可以参考这里:

https://gist.github.com/hetyk...

把这些代码下载到一个shell脚本里,一键添加完成。

 

Python相关

pip国内镜像

$ cat ~/.pip/pip.conf
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple

 

conda国内镜像

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes

 

其它语言

flutter国内镜像

set -x PUB_HOSTED_URL https://pub.flutter-io.cn
set -x FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn

 

补充

github国内镜像

如果是在 git clone时遇到了问题,可以先在码云建立一个库,来源取自github,然后同步码云这个库即可。

作者:张京

来源:https://segmentfault.com/a/1190000023288827

分享到:
标签:镜像 国内
用户无头像

网友整理

注册时间:

网站:5 个   小程序:0 个  文章:12 篇

  • 51998

    网站

  • 12

    小程序

  • 1030137

    文章

  • 747

    会员

赶快注册账号,推广您的网站吧!
最新入驻小程序

数独大挑战2018-06-03

数独一种数学游戏,玩家需要根据9

答题星2018-06-03

您可以通过答题星轻松地创建试卷

全阶人生考试2018-06-03

各种考试题,题库,初中,高中,大学四六

运动步数有氧达人2018-06-03

记录运动步数,积累氧气值。还可偷

每日养生app2018-06-03

每日养生,天天健康

体育训练成绩评定2018-06-03

通用课目体育训练成绩评定