当我尝试通过运行rvm pkg install iconv
来安装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
我该如何解决这个问题?
答案 0 :(得分:6)
尝试:
rvm get head
rvm --skip-autoreconf pkg install iconv
答案 1 :(得分:3)
您不应该使用rvm pkg
,RVM 1.19
附带autolibs
- 这会弃用pkg
。
Autolibs将使用包管理器而不是编译来为ruby提取依赖关系,这将改善rubies与系统其他部分的兼容性。
使用autolibs
非常简单:
rvm get stable
rvm autolibs enable
rvm install ruby
RVM将安装依赖项,然后构建您需要的ruby。