,它如下失敗:當我運行<code>gem install iconv</code>我不能安裝的iconv
Building native extensions. This could take a while...
ERROR: Error installing iconv:
ERROR: Failed to build gem native extension.
current directory: /home/myname/local/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/iconv-1.0.4/ext/iconv
/home/myname/local/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20160802-38989-1ie1z24.rb extconf.rb
checking for rb_enc_get() in ruby/encoding.h... yes
checking for rb_sys_fail_str() in ruby.h... yes
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... no
*** 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.
我不知道如何解決這個問題。 我該怎麼辦?
這是哪個平臺/分佈?您似乎缺少提供iconv.h包含文件的包。 –
我修好了!這兩個選項是必要的。 --with-iconv-include =/usr/local/include --with-iconv-lib =/usr/local/lib – user53216