2

I have tried everything to install cocopods on a M1 mac.

When I do a brew install cocoapods it apparently goes without a problem but when I try to issue pod install I see

pod install zsh: command not found: pod

They I tried to install sudo gem instal ffi

I see this error

Ignoring bigdecimal-1.4.4 because its extensions are not built. Try: gem pristine bigdecimal --version 1.4.4
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring io-console-0.4.8 because its extensions are not built. Try: gem pristine io-console --version 0.4.8
Ignoring json-2.2.0 because its extensions are not built. Try: gem pristine json --version 2.2.0
Ignoring nokogiri-1.10.5 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.5
Ignoring sqlite3-1.4.1 because its extensions are not built. Try: gem pristine sqlite3 --version 1.4.1
Ignoring strscan-1.0.3 because its extensions are not built. Try: gem pristine strscan --version 1.0.3
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle' (no such file), '/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) - /Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych/scalar_scanner.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych/nodes/node.rb:4:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych/nodes.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:19:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/yaml.rb:4:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:701:in `load_yaml'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/config_file.rb:346:in `load_file'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/config_file.rb:198:in `initialize'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/gem_runner.rb:79:in `new'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/gem_runner.rb:79:in `do_configuration'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/gem_runner.rb:44:in `run'
    from /usr/bin/gem:21:in `<main>'

I have tried this with the terminal running using and not using rosetta. No difference.

I also see a lot of errors like

: warning: It seems your ruby installation is missing psych (for YAML output).

Even after reinstalling yaml

I have tried numerous guides to install cocoapods. None work.

How do I solve this?

1
  • That is an old version of ruby in is not even the latest in the 2.x line and that has been end of lifed. try a newer one. Although Homebrew should really deal with this.
    – mmmmmm
    Commented Oct 6, 2023 at 14:00

1 Answer 1

1

Try this command: sudo gem install -n /usr/local/bin cocoapods -v 1.8.4

1
  • 2
    Are you asking the OP to try this or are you offering it as a solution? If it is a solution, it would be helpful to state why it helps (even though it seems obvious) and to provide some instructions/documentation to verify your solution.
    – agarza
    Commented Oct 5, 2023 at 18:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .