简体   繁体   English

在旧 Mac 上安装 Cocoapods

[英]Install Cocoapods on an old Mac

I'm using Unity 5.2.4f game development engine and I have installed ruby 1.9.3 on my old Mac with Lion OS X 10.7.5 system on it.我正在使用 Unity 5.2.4f 游戏开发引擎,并且在我的旧 Mac 上安装了 ruby​​ 1.9.3,上面装有 Lion OS X 10.7.5 系统。 When I open Unity project for the first time, there is an installation attempt which failing and I don't know how to solve this, after trying few days.当我第一次打开 Unity 项目时,有一次安装尝试失败了,尝试了几天后我不知道如何解决这个问题。 Here is the error I get:这是我得到的错误:

    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.

So I go to the Terminal and do the following:所以我去终端并执行以下操作:

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

No change.没变化。 So I do this:所以我这样做:

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

Still get the same message...仍然收到相同的消息...

Enter进入

$PATH

Result:结果:

-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

I have installed lower versions of activesupport 4.2.5 and cocoapods 0.34.4 but no change (I Have installed them because any other versions require Ruby 2.0.0+ which I fail to install)我已经安装了较低版本的 activesupport 4.2.5 和 cocoapods 0.34.4 但没有变化(我已经安装了它们,因为任何其他版本都需要 Ruby 2.0.0+,但我无法安装)

Also if I enter in the Terminal:另外,如果我在终端中输入:

gem list

I get this:我明白了:

*** 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)

I don't have any understanding in Mac, all I did above is by tutorials.我对Mac没有任何理解,我上面所做的都是教程。

Please help me to solve this problem Thanks请帮我解决这个问题谢谢

You can use sudo gem install cocoapods for installing cocoapods in an old mac.您可以使用sudo gem install cocoapods cocoapods 在旧 Mac 上安装 cocoapods。 It will be asking for admin password.它将要求输入管理员密码。

Based on upcoming error do below steps :-根据即将发生的错误,请执行以下步骤:-
1. sudo gem install activesupport -v 4.2.6 1. sudo gem install activesupport -v 4.2.6
2. sudo gem install cocoapods 2. sudo gem install cocoapods

It can be possible you have to check activesupport version with this link.您可能必须使用链接检查 activesupport 版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM