因为电脑坏了,或新电脑安装环境,总会卡在cocoapods安装很长一段时间
时间:2022年01月05日
设备: MacBook Pro 系统:12.1 macOS Montery
出现的问题:
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.
/Library/Ruby/Site/2.6.0/rubygems/dependency.rb:311:in
to_specs': Could not find 'json' (>= 1.5.1) among 50 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/Users/aaa/.rvm/gems/ruby-2.6.6:/Users/aaa/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0:/usr/local/Cellar/cocoapods/1.11.2_1/libexec' , executegem env` for more information
解决方案:
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm list known
rvm install 2.6.6
ruby -v
sudo gem install -n /usr/local/bin cocoapods
参考:
https://clay-atlas.com/blog/2021/02/22/ruby-cn-extconf-failed-solution/
https://blog.csdn.net/mp624183768/article/details/106049466












网友评论