我尝试根据http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-041.8
将我的 ruby 版本从(默认)切换到1.9.3
(Pangolin 的最新版本) -精确的企鹅/。我正在使用apt
.
SO相关问题的其他解决方案涉及apt-get install ruby1.9.3-dev
但我肯定有。
$ sudo gem install idn
Building native extensions. This could take a while...
ERROR: Error installing idn:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lidn... yes
checking for idna.h... yes
checking for punycode.h... yes
checking for stringprep.h... yes
creating Makefile
make
compiling idn.c
compiling idna.c
idna.c: In function ‘toASCII’:
idna.c:88:37: error: ‘struct RString’ has no member named ‘ptr’
idna.c: In function ‘toUnicode’:
idna.c:128:41: error: ‘struct RString’ has no member named ‘ptr’
make: *** [idna.o] Error 1
Gem files will remain installed in /var/lib/gems/1.9.1/gems/idn-0.0.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/idn-0.0.2/ext/gem_make.out
我还检查了我是否已gcc
安装,并且再次从apt
.
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]