2

在 open shift 3 中运行 ruby​​/rails build 时出错。

我在 openshift 2 上使用了我的项目并且它有效。在 openshift 3 上尝试 cooloca 并发生此错误。

我使用了测试项目,它也没有工作。我正在使用ruby 2.4和rails 5。

按照日志:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.


current directory: /opt/app-root/src/bundle/ruby/2.4.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR="
Running autoreconf for libffi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:376: warning: AC_PROG_LD is m4_require'd but not m4_defun'd
acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
acinclude.m4:349: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:376: the top level
configure.ac:376: warning: AC_PROG_LD is m4_require'd but not m4_defun'd
acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
acinclude.m4:349: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:376: the top level
autoreconf: configure.ac: tracing
configure.ac:376: warning: AC_PROG_LD is m4_require'd but not m4_defun'd
acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
acinclude.m4:349: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:376: the top level
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:376: warning: AC_PROG_LD is m4_require'd but not m4_defun'd
acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
acinclude.m4:349: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:376: the top level
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:7636: error: possibly undefined macro: AC_PROG_LD
autoreconf: /usr/bin/autoconf failed with exit status: 1
make: ***
["/opt/app-root/src/bundle/ruby/2.4.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a]
Error 1

make failed, exit code 2

Gem files will remain installed in
/opt/app-root/src/bundle/ruby/2.4.0/gems/ffi-1.9.21 for inspection.
Results logged to
/opt/app-root/src/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.9.21/gem_make.out

An error occurred while installing ffi (1.9.21), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.21'` succeeds before bundling.
4

2 回答 2

0

发生此错误是因为您的系统没有autoconf安装libtool. 我可以说,因为错误消息说你没有使用libtool,但无论如何都强制autoconf运行。

autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force

如您所料,解决方案是安装libtool. 这可以通过运行以下命令使用 apt 来完成。

sudo apt-get update
sudo apt-get install libtool
于 2021-07-18T03:32:53.613 回答
-1

这是一个已知问题

对我来说,这个问题是通过按照这里libffi描述的安装来解决的。

在 ubuntu 上,这很简单

sudo apt install libffi-dev

在 Fedora 上,以下工作:

sudo dnf install libffi-devel

于 2018-02-12T17:01:53.387 回答