【问题标题】:How to address error installing cocoapods (undefined method `invoke_with_build_args' for nil:NilClass)?如何解决安装 cocoapods 的错误(nil:NilClass 的未定义方法 `invoke_with_build_args')?
【发布时间】:2020-05-08 11:51:24
【问题描述】:

我跑

sudo gem install cocoapods

但我收到以下错误。我正在尝试按照Cannot Install Cocoapods - No podfile found in the project directory 上的说明进行操作,但由于无法通过此步骤,因此遇到了困难。

有什么建议吗?

ERROR:  Loading command: install (LoadError)
    dlopen(/Users/sharatakasapu/.rbenv/versions/2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/sharatakasapu/.rbenv/versions/2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle
  Reason: image not found - /Users/sharatakasapu/.rbenv/versions/2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

【问题讨论】:

  • 你解决了吗?

标签: cocoa cocoapods


【解决方案1】:

我终于能够使用来自该站点的信息继续前进,只需升级到rbenv 的新版本: https://qiita.com/nya__str/items/eeddac3a122f0c251d88

# view versions available to install
rbenv install --list

# pick the latest version from the list and install it
rbenv install 2.7.2

# set as the new default
rbenv global 2.7.2

# try again
sudo gem install cocoapods

# ? ? ?

【讨论】:

  • rbenv install 2.7.2 之前运行以下命令以通过运行 brew update && brew upgrade ruby-build 来升级 ruby​​-build
  • 感谢成功!!
猜你喜欢
  • 2016-08-15
  • 2014-06-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-01-12
  • 2023-03-22
  • 1970-01-01
  • 2012-12-27
相关资源
最近更新 更多