CocoaPods无法在macOS High Sierra中工作 [英] CocoaPods not working in macOS High Sierra
问题描述
升级到macOS后,High Sierra CocoaPods无法正常工作。尽管它很想摆脱CocoaPods,但不幸的是目前不在范围之内。错误消息如下。
After upgrading to macOS High Sierra CocoaPods is not working. While it is tempting to move away from CocoaPods, it's unfortunately not in scope right now. The error message is below.
zsh: /Users/****/.gems/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin: no such file or directory
我意识到错误源于Ruby的升级,但是简单的解决方法是什么?试图使CocoaPods使用新的ruby版本会产生其他错误。
I realize that the error stems from Ruby being upgraded but what is the easies fix? Trying to make CocoaPods use the new ruby version yields other errors.
编辑:现在,我安装了 Ruby 2.0
rvm安装2.0.0
和 rvm使用2.0.0
,然后重新安装CocoaPods sudo gem install cocoapods
。似乎现在可以使用。
For now i installed Ruby 2.0
with rvm install 2.0.0
and rvm use 2.0.0
and then reinstalled CocoaPods sudo gem install cocoapods
. Seems to be working now.
推荐答案
根据 https://github.com/CocoaPods/CocoaPods/issues/6778 重新安装CocoaPods应该可以解决此问题:
According to https://github.com/CocoaPods/CocoaPods/issues/6778 reinstalling CocoaPods should solve this issue:
sudo gem install cocoapods
这篇关于CocoaPods无法在macOS High Sierra中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!