我正在尝试在 ruby 1.9.3 上安装 iconv (gem),但是运行时失败:
宝石安装图标v
Building native extensions. This could take a while...
ERROR: Error installing iconv:
ERROR: Failed to build gem native extension.
/home/adhown/.rbenv/versions/1.9.3-p0/bin/ruby extconf.rb
checking for iconv() in iconv.h... yes
checking for const of iconv() 2nd argument... no
creating Makefile
make
compiling iconv.c
In file included from iconv.c:21:0:
/home/adhown/.rbenv/versions/1.9.3-p0/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h" [-Wcpp]
iconv.c:22:20: fatal error: intern.h: No such file or directory
compilation terminated.
make: *** [iconv.o] Error 1
Gem files will remain installed in /home/adhown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/iconv-0.1 for inspection.
Results logged to /home/adhown/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/iconv-0.1/ext/iconv/gem_make.out
我用 rbenv 安装 ruby 是否相关?
谁知道怎么解决,谢谢。