Trying to initialize a CocoaPod for an Xcode project ends up with a Bad CPU type in executable

214 Views Asked by At

I have installed CocoaPods on my system via terminal with the command:

    gem install cocoapods

Apparently everything went well.

Now I have a new Xcode project that I want to initialize CocoaPods. I am in the working directory for the new app and I type:

    pod init

and receive this back:

Traceback (most recent call last):
    10: from /usr/local/bin/pod:23:in `<main>'
     9: from /usr/local/bin/pod:23:in `load'
     8: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
     7: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:49:in `run'
     6: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:140:in `verify_minimum_git_version!'
     5: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:126:in `git_version'
     4: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/executable.rb:148:in `capture_command'
     3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:390:in `capture2e'
     2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:208:in `popen2e'
     1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': Bad CPU type in executable - /usr/local/bin/git (Errno::EBADARCH)
Randy@RANDYS-MAC-PRO-3 CTHelpDemo % 

In the end there is no Podfile in the directory. Any help would be greatly appreciated.

I am running Big Sur V11.4. The terminal is using zsh.

0

There are 0 best solutions below