在 MacOS X 10.3 上安装 CocoaPods 时遇到问题。第一次尝试失败,并提示小睡的 DependencyError。我安装了小睡,然后再试一次,结果相同。卸载和重新安装没有帮助。
andreass-mbp:~ AndreasB$ sudo gem uninstall cocoapods
Password:
andreass-mbp:~ AndreasB$ sudo gem uninstall nap
Successfully uninstalled nap-1.0.0
andreass-mbp:~ AndreasB$ sudo gem install nap
Fetching: nap-1.0.0.gem (100%)
Successfully installed nap-1.0.0
Parsing documentation for nap-1.0.0
Installing ri documentation for nap-1.0.0
1 gem installed
andreass-mbp:~ AndreasB$ sudo gem install cocoapods
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: cocoapods requires nap (~> 0.8); cocoapods-stats requires nap (~> 0.8); cocoapods-core requires nap (~> 0.8.0)
最佳答案
尝试安装预发布版本:
sudo gem install cocoapods --pre