怀着愉快期待的心情把mac升级后,发现终端输入:
pod install
失败~心塞😑, 提示如下:
:-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad
解决办法:
1 .重新安装 sudo gem install -n /usr/local/bin cocoapods
*若安装过程中失败,且终端给出如下提示:While executing gem ... (TypeError) no implicit conversion of nil into String
说明你的装备需要更新,输入:sudo gem update --system
注:sudo
很重要, 不添加sudo
会出现ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
表示没有操作权限,这些操作需要管理员权限, sudo是获取管理员权限, 按照步骤输入管理员密码即可.
- 重新
pod install
, 完美
参考链接:https://blog.csdn.net/FISHBALL1/article/details/78709115