running pod set up gives me “bad interpreter: No such file or directory”

China☆狼群 提交于 2019-12-02 18:17:56
Torre Lasley

I encountered this problem when upgrading to Mac OS High Sierra.

This was my fix:

sudo gem install cocoapods

I found this answer on the CocoaPods issue list on Github.

After upgraded to High Sierra, I got the same error, just reinstalled the cocoapods

sudo gem install -n /usr/local/bin cocoapods
Niraj Paul

Same issue I was facing when I updated our system from Sierra to Mojave. Also works for Catalina

The following steps worked:

sudo gem update --system
sudo gem install -n /usr/local/bin cocoapods

I got the help from the following link.

i fixed it by running brew install ruby

This happened when I upgraded to Catalina. I solved it by running:

sudo gem install -n /usr/local/bin ruby
sudo gem install -n /usr/local/bin cocoapods

While I'm trying to install again then I got another error saying that

ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

Then I did this and worked fine.

sudo gem uninstall cocoapods

sudo gem install cocoapods
brew link --overwrite cocoapods

This line saved my day.

On my mac this solved the problem:

brew uninstall cocoapods

brew install cocoapods

Fixed with

brew upgrade cocoapods

In my case nothing of the above worked. I had ruby 2.3.0 installed and I had to downgrade to 2.0.0:

gem update --system 2.0.0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!