Search code examples
ioscocoapods

Facing issue - bad interpreter: No such file or directory when used pod update on MAC


Getting error like:

-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory

I have tried to use sudo gem install cocoapods but it is giving

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.0/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20200605-20675-yfsgd0.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

Please help with this. Thanks!


Solution

  • Came to know that it is due to xcode installation issue. so have to agree to term

    step 1: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

    step 2: sudo gem install cocoapods (use sudo gem install cocoapods -n /usr/local/bin if you get permission issue)

    step 3: pod update