美文网首页
执行pod Library/Ruby/Site/2.6.0/ru

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

作者: 稀释1 | 来源:发表于2021-05-27 09:37 被阅读0次
    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 命令
    成功了,遇到这种问题的可以尝试

    相关文章

      网友评论

          本文标题:执行pod Library/Ruby/Site/2.6.0/ru

          本文链接:https://www.haomeiwen.com/subject/hksrsltx.html