【发布时间】:2019-03-20 21:14:26
【问题描述】:
所以基本上RubyNumberTheory 需要 NArray gem,而且它似乎需要一些本机编译工具,可能还需要一些额外的配置。所以在 Fedora 29 上,这是尝试过的
$ gem install narray
Building native extensions. This could take a while...
ERROR: Error installing narray:
ERROR: Failed to build gem native extension.
[…]
checking for stdint.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
我确实通过 dnf 安装了一些软件包,例如 gcc ruby-devel rubygems 和 group install "C Development Tools and Libraries",甚至还有一些更意想不到的 arm-none-eabi-newlib。实际上,标头似乎很好地安装在系统上
$ whereis stdint.h
stdint: /usr/include/stdint.h
即使环境变量设置如下:
export LIBRARY_PATH=/usr/include
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/include
gem 仍然无法安装,告诉 stdint.h 没有找到。还有什么可以尝试的?
【问题讨论】:
标签: ruby rubygems fedora stdint narray