running pod set up gives me “bad interpreter: No such file or directory”

前端 未结 14 2208
野性不改
野性不改 2020-12-13 02:53

recently tried to do pod setup and i get this:

-bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directo         


        
相关标签:
14条回答
  • 2020-12-13 03:31

    The following worked for me:

    Select Command Line Tools in XCode.

        XCode > Preferences > Locations > Command Line Tools > XCode 11.X.X
    
    In terminal execute:
    
        sudo gem install cocoapods -n /usr/local/bin
    

    https://stackoverflow.com/a/60464653

    0 讨论(0)
  • 2020-12-13 03:33

    Same issue I was facing when I updated our system from Sierra to Mojave. Also works for Catalina

    The following steps worked:

    sudo gem update --system
    sudo gem install -n /usr/local/bin cocoapods
    

    I got the help from the following link.

    0 讨论(0)
  • 2020-12-13 03:34

    While I'm trying to install again then I got another error saying that

    ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

    Then I did this and worked fine.

    sudo gem uninstall cocoapods
    
    sudo gem install cocoapods
    
    0 讨论(0)
  • 2020-12-13 03:34

    Fixed with

    brew upgrade cocoapods
    
    0 讨论(0)
  • 2020-12-13 03:36

    After upgraded to High Sierra, I got the same error, just reinstalled the cocoapods

    sudo gem install -n /usr/local/bin cocoapods
    
    0 讨论(0)
  • 2020-12-13 03:37

    This happened when I upgraded to Catalina. I solved it by running:

    sudo gem install -n /usr/local/bin ruby
    sudo gem install -n /usr/local/bin cocoapods
    
    0 讨论(0)
提交回复
热议问题