0

所以基本上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 没有找到。还有什么可以尝试的?

4

1 回答 1

0

查看mkmf.log文件,似乎系统缺少redhat-hardened-cc1,所以一个简单的sudo dnf install redhat-rpm-config修复。

于 2019-03-21T21:44:05.277 回答