当前位置:   article > 正文

CocoaPods安装时报错_while executing gem ... (gem::exception) failed to

while executing gem ... (gem::exception) failed to find gems ["json"] = 2.7.

前言

CocoaPods安装时报错

❌信息如下:

Fetching cocoapods-deintegrate-1.0.5.gem
Fetching ffi-1.15.5.gem
Fetching ethon-0.15.0.gem
Fetching typhoeus-1.4.0.gem
Fetching public_suffix-4.0.6.gem
Fetching fuzzy_match-2.0.4.gem
Fetching concurrent-ruby-1.1.9.gem
Fetching json-2.6.1.gem
Fetching httpclient-2.8.3.gem
Fetching algoliasearch-1.27.5.gem
Fetching addressable-2.8.0.gem
Fetching zeitwerk-2.5.4.gem
Fetching tzinfo-2.0.4.gem
Fetching minitest-5.15.0.gem
Fetching cocoapods-1.11.2.gem
Fetching i18n-1.10.0.gem
Fetching activesupport-6.1.4.6.gem
Fetching cocoapods-core-1.11.2.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

解决
前提我是已经添加了sudo,进行的

sudo gem install -n /usr/local/bin cocoapod
    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/620350
    推荐阅读
    相关标签
      

    闽ICP备14008679号