美文网首页CocoaPods
CocoaPods-升级到macOS Catalina报错 -b

CocoaPods-升级到macOS Catalina报错 -b

作者: ruizuo007 | 来源:发表于2019-10-22 09:44 被阅读0次

问题描述

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

解决方案一

重新升级安装Cocoapods。参考:https://guides.cocoapods.org/using/getting-started.html#getting-started

$ [sudo] gem install cocoapods

··· 省略 ···

$ pod install
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /usr/local/Cellar in PATH, mode 040777
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 16 dependencies from the Podfile and 17 total pods installed.

解决方案二

如果是使用HomeBrew的方式安装CocoaPods,则可以按照以下顺序操作。参考:iOS-解决MacPod报错 -bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/...

  1. 执行如下命令
$ brew link --overwrite cocoapods
  1. 尝试Pod命令是否已经恢复,若报错则继续执行如下命令
$ brew reinstall cocoapods
 
$ brew install ruby
 
$ brew link --overwrite cocoapods
  1. 尝试Pod命令是否已经恢复

相关文章

网友评论

    本文标题:CocoaPods-升级到macOS Catalina报错 -b

    本文链接:https://www.haomeiwen.com/subject/teptvctx.html