Cocoapods: cocoapods error code 1 on MacOS Big Sur xcode 12

Created on 29 Sep 2020  路  14Comments  路  Source: CocoaPods/CocoaPods

Running sudo gem install cocopods
shows error code 1 on macOS Big Sur 11 Beta and code 12 .
i tried to run gem install cocopods shows don't have permission to write directory

awaiting input

Most helpful comment

@altrr2 should I install xcode 11 on it?

you need to install SDK for MacOS 11 aka Big Sur

To that with Xcode 12 (or possibly any previous version):

  1. install the latest beta (12.2 beta 2 as of now) of command line tool from apple developer portal
  2. sudo xcode-select --switch /Library/Developer/CommandLineTools
  3. sudo gem install cocoapods
  4. sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Alternatively you can try upgrading Xcode to 12.2 latest beta, in theory should work, but I haven't tried that

All 14 comments

This is not a sufficient issue report.

Please provide more information on what the failure is.

The following are the output of sudo gem install cocoapods. I have installed the flutter environment my apps support cocopods i need them
Screenshot (16)
Screenshot (17)
Screenshot (18)
Screenshot (19)

here you can see the xcode version its the macOS 11 beta Big Sur with code 12 GM
flu

From a quick scan of the screenshots this seems like you might need to install Xcode Development Tools as the error message says.

Either way, I continue to believe this issue is specific to your environment and not a CocoaPods library issue.

I cannot provide any solution here or think of a thing that CocoaPods can change in order to "fix" this.

i showed the environment what its says but I run simple terminal command sudo gem install cocoapods there was no any other environment involve and I need simple solution to install cocoapods on macOS big sur i just tried simple command without any other environment ..

I simply tried the command on the terminal without the involvement of any third party environment sudo get install cocoapods which shows error above exit code 1 you can check the error above

Try using a different Ruby version? From checking screnshots again it seems related maybe to ffi gem which people have had issues before. Asked both in ffi repo but also here.

I am sorry I do not know exactly the issue and I cannot assist as the installation works for me and on CI. I suspect we would have a ton of other reports here given that CocoaPods is installed thousands times a day from folks.

Right i understand could you please give me some commands to change rubby version and the best command to install again

Use rvm (https://rvm.io/) or chruby perhaps

sure let em try thank you

I run into exactly the same problem today. Fresh install of macOS Big Sur beta 9.

Ruby is the same version as on my Catalina machine, where cocoapods work fine, except for darwin19/20
ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

Managed to install cocoapods 1.8.4 on Big Sur machine successfully, but no luck with 1.9.x due to the same problem as above (and log file pointing to missing ruby/config.h).

Finally, all worked fine after installing Command Line Tools for Xcode 12.2 beta 2 and switching to them.

I guess this is because Xcode 12 / Command Line Tools 12 do not include MacOSX11.0.sdk required to build the latest cocoapods. Should work ok with 12.2. beta 2.

Hope it helps.

@altrr2 should I install xcode 11 on it?

@altrr2 should I install xcode 11 on it?

you need to install SDK for MacOS 11 aka Big Sur

To that with Xcode 12 (or possibly any previous version):

  1. install the latest beta (12.2 beta 2 as of now) of command line tool from apple developer portal
  2. sudo xcode-select --switch /Library/Developer/CommandLineTools
  3. sudo gem install cocoapods
  4. sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Alternatively you can try upgrading Xcode to 12.2 latest beta, in theory should work, but I haven't tried that

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:

Was this page helpful?
0 / 5 - 0 ratings