gpt4 book ai didi

ruby - 在 Alpine 上建立 ruby 1.8.7

转载 作者:行者123 更新时间:2023-12-02 20:00:05 24 4
gpt4 key购买 nike

当我尝试编译ruby 1.8.7时出现此错误

BUILD FAILED (Alpine Linux 3.8.2 using ruby-build 20181225)

Inspect or clean up the working tree at /tmp/ruby-build.20190128170412.7047
Results logged to /tmp/ruby-build.20190128170412.7047.log

Last 10 log lines:
return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0));
^~~~~~~~~~~~~~~~~~~~~~~
In file included from ossl_pkcs7.c:11:0:
ossl.h:118:7: note: expected 'struct stack_st_X509_CRL *' but argument is of type 'int *'
VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
^~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:188: ossl_pkcs7.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/ruby-build.20190128170412.7047/ruby-1.8.7/ext/openssl'
make: *** [Makefile:285: all] Error 1

这是我正在使用的Docker文件
FROM alpine

ENV RUBY_VERSION "1.8.7"

ENV RUBYBUILD_PACKAGES \
build-base \
autoconf \
git \
subversion \
bison \
zlib-dev \
openssl-dev \
yaml-dev \
readline-dev \
ncurses-dev \
libffi-dev \
gdbm-dev

ENV RUBYLIB_PACKAGES \
zlib \
openssl \
yaml \
readline \
ncurses \
libffi \
gdbm

ENV EXTRA_PACKAGES \
ca-certificates \
bash \
curl

RUN apk update && \
apk upgrade && \
apk add $RUBYBUILD_PACKAGES $RUBYLIB_PACKAGES $EXTRA_PACKAGES && \
git clone https://github.com/sstephenson/ruby-build.git /tmp/ruby-build
RUN cd /tmp/ruby-build && ./install.sh && cd - && rm -rf /tmp/ruby-build

这是完整的日志

https://gist.github.com/nkhine/0b7f5c162313946ddd2f8d7feb57144a

任何建议都非常感谢

最佳答案

我已经设法在Alpine上使用较旧版本的openssl(例如1.0.1e)构建了ruby 1.8.7。因此,问题就出在@ ivan-yurov所说的。

关于ruby - 在 Alpine 上建立 ruby 1.8.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54407089/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com