昨天把 fedora 格了装了 Ubuntu LTS,刚照着 wiki 安装到 $rvm pkg install readline 时 报错如下:
Fetching readline-5.2.tar.gz to /home/diglike/.rvm/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1989k 100 1989k 0 0 286k 0 0:00:06 0:00:06 --:--:-- 477k
Extracting readline-5.2.tar.gz to /home/diglike/.rvm/src
Applying patch '/home/diglike/.rvm/patches/readline-5.2/shobj-conf.patch'...
Prepare readline in /home/diglike/.rvm/src/readline-5.2.
Error running 'autoreconf -is --force', please read /home/diglike/.rvm/log/readline/autoreconf.log
Configuring readline in /home/diglike/.rvm/src/readline-5.2.
Compiling readline in /home/diglike/.rvm/src/readline-5.2.
Installing readline to /home/diglike/.rvm/usr
Fetching readline-6.2.tar.gz to /home/diglike/.rvm/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2224k 100 2224k 0 0 335k 0 0:00:06 0:00:06 --:--:-- 453k
Extracting readline-6.2.tar.gz to /home/diglike/.rvm/src
Applying patch '/home/diglike/.rvm/patches/readline-6.2/patch-shobj-conf.diff'...
Prepare readline in /home/diglike/.rvm/src/readline-6.2.
Error running 'autoreconf -is --force', please read /home/diglike/.rvm/log/readline/autoreconf.log
Configuring readline in /home/diglike/.rvm/src/readline-6.2.
Compiling readline in /home/diglike/.rvm/src/readline-6.2.
Installing readline to /home/diglike/.rvm/usr
$ cat autoreconf.log
cat autoreconf.log
[2012-04-28 14:50:46] autoreconf -is --force
autoheader: warning: missing template: CTYPE_NON_ASCII
autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL
autoheader: warning: missing template: HAVE_BSD_SIGNALS
autoheader: warning: missing template: HAVE_GETPW_DECLS
autoheader: warning: missing template: HAVE_LANGINFO_CODESET
autoheader: warning: missing template: HAVE_MBRLEN
autoheader: warning: missing template: HAVE_MBSCMP
autoheader: warning: missing template: HAVE_MBSNRTOWCS
autoheader: warning: missing template: HAVE_MBSRTOWCS
autoheader: warning: missing template: HAVE_MBSTATE_T
autoheader: warning: missing template: HAVE_POSIX_SIGNALS
autoheader: warning: missing template: HAVE_POSIX_SIGSETJMP
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_FILENO
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_INO
autoheader: warning: missing template: HAVE_USG_SIGHOLD
autoheader: warning: missing template: HAVE_WCRTOMB
autoheader: warning: missing template: HAVE_WCSCOLL
autoheader: warning: missing template: HAVE_WCSDUP
autoheader: warning: missing template: HAVE_WCTYPE
autoheader: warning: missing template: HAVE_WCWIDTH
autoheader: warning: missing template: MUST_REINSTALL_SIGHANDLERS
autoheader: warning: missing template: NO_MULTIBYTE_SUPPORT
autoheader: warning: missing template: SPEED_T_IN_SYS_TYPES
autoheader: warning: missing template: STRCOLL_BROKEN
autoheader: warning: missing template: STRUCT_WINSIZE_IN_SYS_IOCTL
autoheader: warning: missing template: STRUCT_WINSIZE_IN_TERMIOS
autoheader: warning: missing template: TIOCSTAT_IN_SYS_IOCTL
autoheader: warning: missing template: VOID_SIGHANDLER
autoreconf: /usr/bin/autoheader failed with exit status: 1
以前也是这错误,找了很多方法试了不行,刚开始学习 ruby,忽略后 rails console 有问题,索性就用源码装的 ruby。 在 http://ruby-china.org/topics/996 看到 @superbatironmans5 的方法是 gem install rb-readline, then added gem 'rb-readline' to my app's Gemfile,想知道使用 Ubuntu 的童鞋是怎么装的?