在旧Mac上安装Cocoapods

时间:2017-08-24 09:13:06

标签: ios macos unity3d cocoapods osx-lion

我使用的是Unity 5.2.4f游戏开发引擎,我在我的旧Mac上安装了带有Lion OS X 10.7.5系统的ruby 1.9.3。 当我第一次打开Unity项目时,安装尝试失败了,经过几天的努力,我不知道如何解决这个问题。这是我得到的错误:

    IOS RESOLVER

Failed to install Cocoapods for the current user.

It will not be possible to install Cocoapods in the generated Xcode project which will result in link errors when building your application.

For more information see:
  https://guides.cocoapods.org/using/getting-started.html


'gem install activesupport -v 4.2.6 --user-install' failed with code (1):


WARNING:  You don't have /Users/DAN26/.gem/ruby/1.8/bin in your PATH,
    gem executables will not run.
ERROR:  Error installing activesupport:
  i18n requires Ruby version >= 1.9.3.

所以我去了航站楼并做了以下事情:

export PATH="/Users/DAN26/.gem/ruby/1.9.3/bin:$PATH"

没有变化。所以我这样做:

export PATH="/Users/DAN26/.gem/ruby/1.8/bin:$PATH"

仍然得到相同的消息......

输入

$PATH

结果:

-bash: /usr/local/opt/openssl/bin:/Users/DAN26/.rbenv/bin:/Users/DAN26/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/DAN26/.rvm/bin: No such file or directory

我安装了较低版本的activesupport 4.2.5和cocoapods 0.34.4,但没有变化 (我已安装它们,因为任何其他版本都需要我无法安装的Ruby 2.0.0+)

如果我进入终端:

gem list

我明白了:

*** LOCAL GEMS ***

activesupport (4.2.9, 4.2.6, 4.2.5, 3.2.22.5)
bigdecimal (1.1.0)
claide (0.7.0)
cocoapods (0.34.4)
cocoapods-core (0.34.4)
cocoapods-downloader (0.7.2)
cocoapods-plugins (0.3.2)
cocoapods-trunk (0.3.1)
cocoapods-try (0.4.5)
colored (1.2)
escape (0.0.4)
fuzzy_match (2.0.4)
i18n (0.8.6)
io-console (0.3)
json (1.8.6, 1.5.5)
json_pure (1.8.6)
minitest (5.10.3, 2.5.1)
multi_json (1.12.1)
nap (1.1.0, 0.8.0)
netrc (0.7.8)
open4 (1.3.4)
rake (0.9.2.2)
rdoc (3.9.5)
thread_safe (0.3.6)
tzinfo (1.2.3)
xcodeproj (0.19.4)

我对Mac没有任何了解,我上面所做的只是教程。

请帮我解决这个问题 感谢

1 个答案:

答案 0 :(得分:0)

您可以使用sudo gem install cocoapods在旧Mac中安装cocoapods。它会要求输入管理员密码。

根据即将发生的错误执行以下步骤: -
1. sudo gem install activesupport -v 4.2.6
2. sudo gem install cocoapods

您可以使用this链接检查activesupport版本。