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

后端 未结 23 1783
深忆病人
深忆病人 2020-12-04 19:06

I am trying to install cocoapods to my MacBook Pro running with OSX 10.9.1 (new Mavericks) and after type gem install cocoapods I get the following error:

23条回答
  •  鱼传尺愫
    2020-12-04 19:22

    If none of above works then follow these steps

    1. sudo xcode-select --switch /Library/Developer/CommandLineTools
    2. sudo gem install cocoapods

    If you get error like this '

    ERROR:  While executing gem ... (Gem::FilePermissionError)
        You don't have write permissions for the /usr/bin directory
    

    .'

    then go to step 3

    1. $ sudo gem install -n /usr/local/bin cocoapods

提交回复
热议问题