执行pod Library/Ruby/Site/2.6.0/ru

2021-05-27  本文已影响0人  稀释1
Traceback (most recent call last):
    4: from /usr/local/bin/ruby_executable_hooks:22:in `<main>'
    3: from /usr/local/bin/ruby_executable_hooks:22:in `eval'
    2: from /usr/local/bin/pod:23:in `<main>'
    1: from /Library/Ruby/Site/2.6.0/rubygems.rb:300:in `activate_bin_path'
/Library/Ruby/Site/2.6.0/rubygems.rb:281:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
pod install 失败  ,报这个错,试过了

解决步骤:
1、sudo gem update --system
2、gem install cocoapods

没成功,然后使用

1.rvm get stable  

2.gem install cocoapods  

如果报错 没有权限

  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
zhoulangkejideiMac:testpod linmac$ sudo  While executing gem ... (Gem::FilePermissionError)

前面加sudo

sudo gem install cocoapods

执行后报错

ERROR:  Error installing cocoapods:
    ERROR: Failed to build gem native extension.

查看 https://www.jianshu.com/p/174f7f21d808 解决

gem install cocoapods 

最后执行pod 命令
成功了,遇到这种问题的可以尝试

上一篇下一篇

猜你喜欢

热点阅读