在 OS X Mavericks 上安装 Calabash-Android 会导致错误 [英] Install Calabash-Android causes error on OS X Mavericks

查看:30
本文介绍了在 OS X Mavericks 上安装 Calabash-Android 会导致错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试安装 Calabash-Android 时需要一些帮助.安装 rvm, home-brew 后,当我安装 Calabash 时出现一个奇怪的错误:

I need some help with trying to install Calabash-Android. After installing rvm, home-brew, when I install Calabash i get a strange error:

sudo gem install calabash-android
Building native extensions.  This could take a while...
ERROR:  Error installing calabash-android:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make "DESTDIR="
compiling gherkin_lexer_ar.c
ragel/i18n/ar.c.rl:440:1: warning: control may reach end of non-void function [-    Wreturn-type]
}
^
ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18: warning: unused variable     'lexer_en_main' [-Wunused-const-variable]
static const int lexer_en_main = 1;
             ^
2 warnings generated.
linking shared-object gherkin_lexer_ar.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-    argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [gherkin_lexer_ar.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for   inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin-        2.12.2/ext/gherkin_lexer_ar/gem_make.out
doronkatz@Dorons-MacBook-Air ~ $ mkdir ~/android
doronkatz@Dorons-MacBook-Air ~ $ mkdir ~/android
mkdir: /Users/doronkatz/android: File exists

doronkatz@Dorons-MacBook-Air ~ $ sudo gem install calabash-android密码:构建原生扩展.这可能需要一段时间...错误:安装 calabash-android 时出错:错误:无法构建 gem 原生扩展.

doronkatz@Dorons-MacBook-Air ~ $ sudo gem install calabash-android Password: Building native extensions. This could take a while... ERROR: Error installing calabash-android: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

检查 -lc 中的 main()... 是创建 Makefile

checking for main() in -lc... yes creating Makefile

make "DESTDIR="

编译 gherkin_lexer_ar.cragel/i18n/ar.c.rl:440:1:警告:控制可能到达非空函数的结尾 [-Wreturn-type]}^ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18:警告:未使用的变量 'lexer_en_main' [-Wunused-const-variable]静态常量 int lexer_en_main = 1;^生成 2 个警告.链接共享对象 gherkin_lexer_ar.bundleclang:错误:未知参数:'-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]clang:注意:这将是未来的硬错误(不能降级为警告)make: *** [gherkin_lexer_ar.bundle] 错误 1

compiling gherkin_lexer_ar.c ragel/i18n/ar.c.rl:440:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18: warning: unused variable 'lexer_en_main' [-Wunused-const-variable] static const int lexer_en_main = 1; ^ 2 warnings generated. linking shared-object gherkin_lexer_ar.bundle clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line- argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgraded to a warning) in the future make: *** [gherkin_lexer_ar.bundle] Error 1

 Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin-   2.12.2/ext/gherkin_lexer_ar/gem_make.out

不知道错误是什么意思,我也为小牛安装了 Xcode 工具.有什么想法吗?

Not sure what the error means, I have installed Xcode tools for mavericks as well. Any thoughts out there?

推荐答案

我遇到了同样的问题,我刚刚找到了解决方案.

I had the same problem and I just found out a solution for this.

我在这里发现了一个相关的问题:

I found one related problem here:

http://techespanto.wordpress.com/2013/03/29/upgrade-ruby-version-on-mac-osx/

它建议我必须升级我机器上的 ruby​​ 版本.该链接中的前两个命令不起作用,所以我把我所做的留在这里:

and it suggested I had to upgrade the ruby version on my machine. The first two commands in that link are not working, so I leave you here what I did:

为 mac 安装命令行工具:

Install the command line tools for mac with:

xcode-select --install

在你的 Mac 上安装自制软件:

Install homebrew in your mac with:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

安装 rvm:

curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable

列出最新的 ruby​​ 版本:

List the latest ruby versions with:

rvm list known

安装最新的 ruby​​ 版本:

Install the latest ruby version with:

rvm install ruby-<version>

(对我来说是 ruby-2.1-head)

仅此而已.希望它也适用于您!

And that's all. Hope it works for you as well!

这篇关于在 OS X Mavericks 上安装 Calabash-Android 会导致错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆