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