Mac brew 包管理工具安装与常用包

2021-10-28  本文已影响0人  bianruifeng
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
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/
brew install wget
brew install python3
echo 'alias python="/usr/local/bin/python3"' >> ~/.zshrc
echo 'alias pip="/usr/local/bin/pip3"' >> ~/.zshrc
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

清华大学开源软件镜像站

上一篇下一篇

猜你喜欢

热点阅读