Ruby ubuntu 安装 ruby1.9.3 出现 Error running 'autoreconf -is --force'

bindiry · 2012年02月01日 · 最后由 hiveer 回复于 2013年10月18日 · 8985 次阅读

安装 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

#1 楼 @superbatironmans5 装 1.9.2 是没啥问题,但是装 1.9.3 就会有如上问题了,考虑要不要换回 1.9.2

#2 楼 @bindiry ubuntu 上开发的时候我一般不用 rvm,直接 apt-get install ruby1.9.2-full 就能搞定

@bindiry 我也遇到了这个问题 我运行 rails console 出现错误,说是 readline 的问题,不知到你遇到了没有 看http://ruby-china.org/topics/3116楼

看看 /usr/local/rvm/log/readline/autoreconf.log 里面是什么

@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 filebuild-aux/config.guess' libtoolize: linking file build-aux/config.sub' libtoolize: linking filebuild-aux/install-sh' libtoolize: linking file build-aux/ltmain.sh' libtoolize: Consider addingAC_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 filebuild-aux/config.guess' libtoolize: linking file build-aux/config.sub' libtoolize: linking filebuild-aux/install-sh' libtoolize: linking file build-aux/ltmain.sh' libtoolize: Consider addingAC_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/

请问后来解决了吗?为什么会编译错误。。我先再也是 不会是 64 位问题吧?

你的 autoconf 版本和开发者使用的版本不兼容

#6 楼 @superbatironmans5 AC_EILSEQ应该是libiconv的 m4 宏

本地 m4 宏不全的不要顺便玩autoreconf,用./configure不就行了吗?

@bindiry 这个问题解决了吗?怎么解决的?

#2 楼 @bindiry 今早刚换回 1.9.2,

#6 楼 @superbatironmans5 哥们你的好用了吗?怎么解决的?

@scott
gem install rb-readline, then added gem 'rb-readline' to my app's Gemfile

我认为你该贴出 read /usr/local/rvm/log/readline/autoreconf.log 来。

请问您的这个问题解决了么?

可能需要 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 是如何具体操作的?谢谢

在 Gemfile 里加上 gem'rb-readline',然后 gem install

21 楼 这个方法验证过吗 我怎么不得行呢

LinuxGit Ubuntu RVM 安装报错 提及了此话题。 04月03日 10:56
需要 登录 后方可回复, 如果你还没有账号请 注册新账号