我尝试按照http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/将我的ruby版本从1.8
(默认)切换到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]
答案 0 :(得分:1)
我可能会放弃这个。我能够安装punycode4r
宝石,这适用于我正在尝试做的事情。