mac 10.15 cocoapods无法使用的解决办法

mac 10.15 cocoapods无法使用的解决办法

pod 好像说 ruby 不能用了

  • 这样不行 sh-3.2# brew link --overwrite cocoapods

  • 调用这个 sh-3.2# gem update --system ,可能会有问题:

  • 问题是:如果ready only 那么,使用
    – sh-3.2# sudo gem update -n /usr/local/bin --system

  • 最后更新 :sh-3.2# sudo gem install -n /usr/local/bin cocoapods --pre

code

 ✘ zhangbin@zhangbin-mbp  ~/tet/100/100edututorteacher-ios   master  gem update --system
Updating rubygems-update
Fetching rubygems-update-3.0.6.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
 ✘ zhangbin@zhangbin-mbp  ~/tet/100/100edututorteacher-ios   master  sudo su
Password:
sh-3.2# brew link --overwrite cocoapods
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
sh-3.2# gem update --system
Updating rubygems-update
Fetching rubygems-update-3.0.6.gem
Successfully installed rubygems-update-3.0.6
Parsing documentation for rubygems-update-3.0.6
Installing ri documentation for rubygems-update-3.0.6
Installing darkfish documentation for rubygems-update-3.0.6
Done installing documentation for rubygems-update after 46 seconds
Parsing documentation for rubygems-update-3.0.6
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.0.6
ERROR:  While executing gem ... (Errno::EROFS)
    Read-only file system @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/gem
sh-3.2# sudo gem update -n /usr/local/bin --system

Latest version already installed. Done.
sh-3.2# 
sh-3.2# sudo gem update -n /usr/local/bin --system
Latest version already installed. Done.
sh-3.2# sudo gem install -n /usr/local/bin cocoapods --pre

Fetching i18n-0.9.5.gem
Fetching tzinfo-1.2.5.gem
Fetching activesupport-4.2.11.1.gem
Fetching fuzzy_match-2.0.4.gem
Fetching thread_safe-0.3.6.gem
Fetching concurrent-ruby-1.1.5.gem
Fetching nap-1.1.0.gem
Fetching httpclient-2.8.3.gem
Fetching algoliasearch-1.27.1.gem
Fetching cocoapods-core-1.8.4.gem
Fetching claide-1.0.3.gem
Fetching cocoapods-deintegrate-1.0.4.gem
Fetching cocoapods-downloader-1.3.0.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching cocoapods-search-1.0.0.gem
Fetching cocoapods-stats-1.1.0.gem
Fetching netrc-0.11.0.gem
Fetching cocoapods-trunk-1.4.1.gem
Fetching cocoapods-try-1.1.0.gem
Fetching molinillo-0.6.6.gem
Fetching atomos-0.1.3.gem
Fetching colored2-3.1.2.gem
Fetching nanaimo-0.2.6.gem
Fetching xcodeproj-1.13.0.gem
Fetching cocoapods-1.8.4.gem
Fetching escape-0.0.4.gem
Fetching fourflusher-2.3.1.gem
Fetching gh_inspector-1.1.3.gem
Fetching ruby-macho-1.4.0.gem
Successfully installed thread_safe-0.3.6
Successfully installed tzinfo-1.2.5
Successfully installed concurrent-ruby-1.1.5
Successfully installed i18n-0.9.5
Successfully installed activesupport-4.2.11.1
Successfully installed nap-1.1.0
Successfully installed fuzzy_match-2.0.4
Successfully installed httpclient-2.8.3
Successfully installed algoliasearch-1.27.1
Successfully installed cocoapods-core-1.8.4
Successfully installed claide-1.0.3
Successfully installed cocoapods-deintegrate-1.0.4
Successfully installed cocoapods-downloader-1.3.0
Successfully installed cocoapods-plugins-1.0.0
Successfully installed cocoapods-search-1.0.0
Successfully installed cocoapods-stats-1.1.0
Successfully installed netrc-0.11.0
Successfully installed cocoapods-trunk-1.4.1
Successfully installed cocoapods-try-1.1.0
Successfully installed molinillo-0.6.6
Successfully installed atomos-0.1.3
Successfully installed colored2-3.1.2
Successfully installed nanaimo-0.2.6
Successfully installed xcodeproj-1.13.0
Successfully installed escape-0.0.4
Successfully installed fourflusher-2.3.1
Successfully installed gh_inspector-1.1.3
Successfully installed ruby-macho-1.4.0
Successfully installed cocoapods-1.8.4
Parsing documentation for thread_safe-0.3.6
Installing ri documentation for thread_safe-0.3.6
Parsing documentation for tzinfo-1.2.5
Installing ri documentation for tzinfo-1.2.5
Parsing documentation for concurrent-ruby-1.1.5
Installing ri documentation for concurrent-ruby-1.1.5
Parsing documentation for i18n-0.9.5
Installing ri documentation for i18n-0.9.5
Parsing documentation for activesupport-4.2.11.1
Installing ri documentation for activesupport-4.2.11.1
Parsing documentation for nap-1.1.0
Installing ri documentation for nap-1.1.0
Parsing documentation for fuzzy_match-2.0.4
Installing ri documentation for fuzzy_match-2.0.4
Parsing documentation for httpclient-2.8.3
Installing ri documentation for httpclient-2.8.3
Parsing documentation for algoliasearch-1.27.1
Installing ri documentation for algoliasearch-1.27.1
Parsing documentation for cocoapods-core-1.8.4
Installing ri documentation for cocoapods-core-1.8.4
Parsing documentation for claide-1.0.3
Installing ri documentation for claide-1.0.3
Parsing documentation for cocoapods-deintegrate-1.0.4
Installing ri documentation for cocoapods-deintegrate-1.0.4
Parsing documentation for cocoapods-downloader-1.3.0
Installing ri documentation for cocoapods-downloader-1.3.0
Parsing documentation for cocoapods-plugins-1.0.0
Installing ri documentation for cocoapods-plugins-1.0.0
Parsing documentation for cocoapods-search-1.0.0
Installing ri documentation for cocoapods-search-1.0.0
Parsing documentation for cocoapods-stats-1.1.0
Installing ri documentation for cocoapods-stats-1.1.0
Parsing documentation for netrc-0.11.0
Installing ri documentation for netrc-0.11.0
Parsing documentation for cocoapods-trunk-1.4.1
Installing ri documentation for cocoapods-trunk-1.4.1
Parsing documentation for cocoapods-try-1.1.0
Installing ri documentation for cocoapods-try-1.1.0
Parsing documentation for molinillo-0.6.6
Installing ri documentation for molinillo-0.6.6
Parsing documentation for atomos-0.1.3
Installing ri documentation for atomos-0.1.3
Parsing documentation for colored2-3.1.2
Installing ri documentation for colored2-3.1.2
Parsing documentation for nanaimo-0.2.6
Installing ri documentation for nanaimo-0.2.6
Parsing documentation for xcodeproj-1.13.0
Installing ri documentation for xcodeproj-1.13.0
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for fourflusher-2.3.1
Installing ri documentation for fourflusher-2.3.1
Parsing documentation for gh_inspector-1.1.3
Installing ri documentation for gh_inspector-1.1.3
Parsing documentation for ruby-macho-1.4.0
Installing ri documentation for ruby-macho-1.4.0
Parsing documentation for cocoapods-1.8.4
Installing ri documentation for cocoapods-1.8.4
Done installing documentation for thread_safe, tzinfo, concurrent-ruby, i18n, activesupport, nap, fuzzy_match, httpclient, algoliasearch, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-stats, netrc, cocoapods-trunk, cocoapods-try, molinillo, atomos, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 21 seconds
29 gems installed
sh-3.2# 
sh-3.2# 

发布了664 篇原创文章 · 获赞 55 · 访问量 217万+

猜你喜欢

转载自blog.csdn.net/commshare/article/details/103400436