安装 ruby1.9.3 之前,我先用 rvm 安装 Readline/ IConv / Zlib / OpenSSL / Autoconf
安装到 readline 和 iconv 的时候,总是有以下错误提示(加粗部分是错误),我确定我安装了 autoconf,也安装了 libreadline-dev:
root@ubuntu-server:~# rvm pkg install readline Fetching readline-5.2.tar.gz to /usr/local/rvm/archives Extracting readline-5.2.tar.gz to /usr/local/rvm/src Applying patch '/usr/local/rvm/patches/readline-5.2/shobj-conf.patch'... Prepare readline in /usr/local/rvm/src/readline-5.2. Error running 'autoreconf -is --force', please read /usr/local/rvm/log/readline/autoreconf.log Configuring readline in /usr/local/rvm/src/readline-5.2. Compiling readline in /usr/local/rvm/src/readline-5.2. Installing readline to /usr/local/rvm/usr Fetching readline-6.2.tar.gz to /usr/local/rvm/archives Extracting readline-6.2.tar.gz to /usr/local/rvm/src Applying patch '/usr/local/rvm/patches/readline-6.2/patch-shobj-conf.diff'... Prepare readline in /usr/local/rvm/src/readline-6.2. Error running 'autoreconf -is --force', please read /usr/local/rvm/log/readline/autoreconf.log Configuring readline in /usr/local/rvm/src/readline-6.2. Compiling readline in /usr/local/rvm/src/readline-6.2. Installing readline to /usr/local/rvm/usr
@bindiry 我也遇到了这个问题 我运行 rails console 出现错误,说是 readline 的问题,不知到你遇到了没有 看http://ruby-china.org/topics/3116楼的
@huachlee 前辈 运行 ROR 都没有问题,就是不能 rails console。。。
装 iconv
[2012-02-02 19:54:34] autoreconf -is --force
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, build-aux'.
libtoolize: linking file
build-aux/config.guess'
libtoolize: linking file build-aux/config.sub'
libtoolize: linking file
build-aux/install-sh'
libtoolize: linking file build-aux/ltmain.sh'
libtoolize: Consider adding
AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding -I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR,
../build-aux'.
libtoolize: linking file ../build-aux/config.guess'
libtoolize: linking file
../build-aux/config.sub'
libtoolize: linking file ../build-aux/install-sh'
libtoolize: linking file
../build-aux/ltmain.sh'
libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding
-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, build-aux'.
libtoolize: linking file
build-aux/config.guess'
libtoolize: linking file build-aux/config.sub'
libtoolize: linking file
build-aux/install-sh'
libtoolize: linking file build-aux/ltmain.sh'
libtoolize: Consider adding
AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
configure.ac:134: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
configure.ac:134: the top level
configure.ac:151: error: possibly undefined macro: AC_EILSEQ
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
装 readline
[2012-02-02 19:59:52] 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
把$rvm_path/usr 下的东西都删了,然后重新装下 1.9.3,如果不用 ree 不用手动安装 readline 什么的了。 参考 http://beginrescueend.com/packages/readline/
@scott
gem install rb-readline, then added gem 'rb-readline' to my app's Gemfile
可能需要 sudo apt-get remove autoconf; sudo apt-get purge autoconf 然后 rvm pkg install autoconf 我是大概这么个过程。
楼上正解:
sudo apt-get remove autoconf
sudo apt-get purge autoconf
rvm pkg install autoconf --verify-downloads 1
rvm pkg install readline --verify-downloads 1
#16 楼 @superbatironmans5 请问 added gem 'rb-readline' to my app's Gemfile 是如何具体操作的?谢谢