我目前正在尝试安装gem nfoiled,它为ncurses提供了一个ruby接口。
我是在 README 中使用gem install elliottcable-nfoiled
建议的。从github存储库手动下载然后用rake install
安装它不起作用,因为echoe-gem存在问题,因此我必须使用正常方式。
不幸的是,它取决于仅与ruby 1.8兼容的gem ncurses-0.9.1
,因此我也无法安装nfoiled(因为它总是首先尝试编译ncurses-0.9.1):
novavortex:/usr/src# gem install elliottcable-nfoiled Building native extensions. This could take a while... ... form_wrap.c: In function `rbncurs_m_new_form': form_wrap.c:395: error: `struct RArray' has no member named `len' form_wrap.c: In function `rbncurs_c_set_field_type': form_wrap.c:619: error: `struct RArray' has no member named `len' form_wrap.c: In function `rbncurs_c_set_form_fields': form_wrap.c:778: error: `struct RArray' has no member named `len' form_wrap.c: In function `make_arg': form_wrap.c:1126: error: `struct RArray' has no member named `len' make: *** [form_wrap.o] Error 1 Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1 for inspection. Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1/gem_make.out novavortex:/usr/src#
我设法修复了ncurses-0.9.1中的问题(通过用RARRAY_LEN(x)替换RARRAY(x) - > len)并安装它,但nfoiled仍然总是试图从新下载的源代码重新编译它
如何在不首先重新编译ncurses的情况下安装nfoiled?
答案 0 :(得分:3)
你说你已经手动修复了ncurses
。然后,您可以使用--ignore-dependencies
开关安装另一个没有依赖关系的gem:
gem install elliottcable-nfoiled --ignore-dependencies
答案 1 :(得分:0)
我能够在ruby 1.9.2-head下安装ncurses-ruby而没有任何问题,我无法安装nfoiled gem,因为它需要特定版本的echoe。
$ gem install --source http://gems.github.com elliottcable-nfoiled
ERROR: Error installing elliottcable-nfoiled:
elliottcable-nfoiled requires ncurses (>= 0, runtime)
$ gem install ncurses
Building native extensions. This could take a while...
Successfully installed ncurses-0.9.1
1 gem installed
Installing ri documentation for ncurses-0.9.1...
Installing RDoc documentation for ncurses-0.9.1...
$ gem install --source http://gems.github.com elliottcable-nfoiled
ERROR: Error installing elliottcable-nfoiled:
elliottcable-nfoiled requires echoe (>= 0, = 3.0.2, runtime)
你确定你有正确的ncurses开发标题,以便构建ruby绑定吗?