3

当我尝试通过运行安装 iconv 时:rvm pkg install iconv失败并出现以下错误:

Error running 'autoreconf -is --force',
please read /usr/local/rvm/log/libiconv/autoreconf.log
Configuring libiconv in /usr/local/rvm/src/libiconv-1.13.1.........................
Error running './configure --prefix=/usr/local/rvm/usr --enable-shared',
please read /usr/local/rvm/log/libiconv/configure.log
Compiling libiconv in /usr/local/rvm/src/libiconv-1.13.1..
Error running 'make -j1',
please read /usr/local/rvm/log/libiconv/make.log

Please note that it's required to reinstall all rubies:

    rvm reinstall all --force

在日志中,它说:

root@web01:~# cat /usr/local/rvm/log/libiconv/autoreconf.log
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

我应该如何解决这个问题?

4

2 回答 2

6

尝试:

rvm get head
rvm --skip-autoreconf pkg install iconv
于 2013-04-07T00:30:30.000 回答
3

您不应该使用rvm pkgRVM1.19自带的autolibs- 不推荐使用pkg

Autolibs 将使用包管理器而不是编译来提取 ruby​​ 的依赖项,这将提高 ruby​​ 与系统其他部分的兼容性。

使用autolibs很简单:

rvm get stable
rvm autolibs enable
rvm install ruby

RVM 将安装依赖项,然后构建您需要的 ruby​​。

于 2013-04-07T01:26:45.957 回答