- 安装
homebrew
(自动切换了国内镜像)
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
- 安装最新的ruby
brew install ruby
//设置环境变量
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc
//设置编译器
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"
更改ruby的源
gem sources //列出默认源
gem sources --remove https://rubygems.org/ //移除默认源
gem sources -add https://gems.ruby-china.com //添加国内的源
gem sources -u
gem sources -l //查看源
*** CURRENT SOURCES ***
http://gems.ruby-china.com/
- 安装下载工具 wget
brew install wget
- 安装
python3
brew install python3
- 设置
python3
为默认首选
两个参数brew install python3
最后返回的路径。
登陆终端默认的用户zsh
还是bash
echo 'alias python="/usr/local/bin/python3"' >> ~/.zshrc
echo 'alias pip="/usr/local/bin/pip3"' >> ~/.zshrc
- 安装node.js
brew install node
//查看源
pod repo
master
- Type: git (unknown)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/mac/.cocoapods/repos/master
trunk
- Type: CDN
- URL: https://cdn.cocoapods.org/
- Path: /Users/mac/.cocoapods/repos/trunk
//更新(20211108 github的源更新非常快)
pod repo update
网友评论