m1 pods安装

1:安装homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

2:安装rvm
curl -L get.rvm.io | bash -s stable
source ~/.bashrc
source ~/.bash_profile

报错:curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
解决:sudo vim /etc/hosts
然后i进入编辑,
添加:
140.82.114.6 api.github.com
185.199.108.133 raw.githubusercontent.com
151.101.1.194 github.global.ssl.fastly.net
140.82.114.3 github.com

https://www.ipaddress.com/site/assets-cdn.github.com
上面网址找到自己电脑对应的ip,添加到hosts中
按esc,:wq保存退出

rvm list known
rvm install 3.0.0
M1安装: arch -x86_64 rvm install 3.0.0
报错:Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config coreutils libyaml libksba readline zlib [email protected]',
执行:git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask

rvm use 3.0.0
3:
sudo arch -x86_64 gem install ffi
sudo arch -x86_64 gem install -n /usr/local/bin cocoapods
sudo gem install -n /usr/local/bin cocoapods
pod --version

你可能感兴趣的:(m1 pods安装)