fastlane: macOS Catalina bad interpreter: No such file or directory

I installed Catalina, but i got error when i run fastlane.

$ fastlane --version

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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 22

Most upvoted comments

For example, I have my GEM_HOME setup to be in my user folder (~/.gem) so I can install gems without using sudo. So in my case, what I did was:

  1. run gem uninstall -aIx. This should uninstall all your installed gems and their binaries. Though this doesn’t seem to completely get rid of them and it didn’t fix the error for me after reinstalling.
  2. So next I went into my gem install directory and deleted the contents of it. For me this is ~/.gem. If you don’t know where your gem install directory is, you can find it by running gem env and looking at the Installation Directory near the top of the output.
  3. Then I reinstalled the gems I needed with gem install fastlane bundler cocoapods. After reinstalling, fastlane and cocoapods stopped throwing bad interpreter error.

me too pls

I solved it using:

brew cask uninstall fastlane
brew cask install fastlane

and adding:

export PATH="$HOME/.fastlane/bin:$PATH" 

to my ~/.zshrc and then restart the terminal

@alindaj6 it looks like you installed fastlane through Homebrew. Is that correct? If so, try reinstalling fastlane with brew reinstall fastlane, and see if that helps.