【问题标题】:Cannot install ruby gems on AIX 7.1 with ruby 2.4.5无法使用 ruby​​ 2.4.5 在 AIX 7.1 上安装 ruby​​ gems
【发布时间】:2019-05-12 09:54:35
【问题描述】:

我刚刚在 AIX 7.1 上从源代码编译了 ruby​​。但是,在制作过程中记录了以下错误。

*** Following extensions failed to configure:
../../../ext/gdbm/extconf.rb:0: Failed to configure gdbm. It will not be installed.
../../../ext/readline/extconf.rb:0: Failed to configure readline. It will not be installed.
../../../ext/zlib/extconf.rb:0: Failed to configure zlib. It will not be installed.
*** Fix the problems, then remove these directories and try again if you want.

现在,当我尝试使用 gem install cool.io-1.5.3.gem 安装 gems 时,出现以下错误:

ERROR:  Loading command: install (LoadError)
        cannot load such file -- zlib
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

edit : gdbm、readline 和 zlib 都是在编译 Ruby 之前使用 rpm 安装的。

【问题讨论】:

  • 你应该有一个从源代码编译的 zlib-1.2.11。
  • 我已经使用 rpm 安装了相同的文件并收到错误消息。甚至 rpm -qa 也显示安装了 zlib、gdbm 和 readlines。是否必须从源代码编译 zlib?我
  • 好吧,我错了:原来 perzl 确实有一个 libz-devel.rpm 包,所以你不必从源代码安装。 perzl.org/aix/index.php?n=Main.Zlib
  • 我在编译 ruby​​ 之前安装了这个。但仍然得到错误。还有其他需要安装的库/包吗?

标签: ruby rubygems zlib aix


【解决方案1】:

确保您已安装以下 RPM 软件包:

  • zlib-devel
  • readline-devel
  • gdbm-devel

AIX Toolbox site 上提供了可用的版本号和直接下载链接。

安装开发包后重新编译 Ruby,它应该可以正确编译这些库,然后重试您的 gem install 命令。

【讨论】:

  • 感谢@anothermh 的帮助。它终于奏效了,我能够安装 ruby​​ gems。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-01-31
  • 2015-12-23
  • 1970-01-01
  • 1970-01-01
  • 2010-09-06
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多