【发布时间】:2017-08-18 11:00:14
【问题描述】:
在使用 rbenv for Ubuntu 16.04 安装 ruby 时,显示有关 ruby 构建的错误。 我已经尝试完全删除 rbenv 并再次重新安装 rbenv,但我得到以下错误。
我已经按照 here 中的 DigitalOcean 安装 rbenv 的程序,并按照 here 为 ruby_build 列出的步骤。我还安装了构建所需的所有依赖项。
在卸载和安装rbenv问题之后仍然是一样的。
~$ rbenv install 2.3.1
Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...
BUILD FAILED (Ubuntu 16.04 using ruby-build 20170726-2-g254728e)
Inspect or clean up the working tree at /tmp/build.20170818162042.1074
Results logged to /tmp/ruby-build.20170818162042.1074.log
Last 10 log lines:
linking shared-object objspace.so
make[2]: Leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1/ext/objspace'
installing default date_core libraries
linking shared-object date_core.so
make[2]: Leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1/ext/date'
linking shared-object nkf.so
make[2]: Leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1/ext/nkf'
make[1]: Leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1'
uncommon.mk:203: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
cat /tmp/ruby-build.20170818162042.1074.log 的结果
In file included from ossl.h:57:0,
from ossl_bn.c:11:
/usr/include/openssl/asn1_mac.h:10:2: error: #error "This file is obsolete; please update your software."
#error "This file is obsolete; please update your software."
^
In file included from ossl.h:221:0,
from ossl_bn.c:11:
openssl_missing.h:78:35: error: macro "EVP_MD_CTX_create" passed 1 arguments, but takes just 0
EVP_MD_CTX *EVP_MD_CTX_create(void);
^
In file included from /usr/include/openssl/x509.h:23:0,
from /usr/include/openssl/x509v3.h:14,
from ossl.h:58,
from ossl_bn.c:11:
openssl_missing.h:82:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
^
openssl_missing.h:90:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
^
ossl_bn.c: In function ‘ossl_bn_size’:
ossl_bn.c:43:19: error: invalid application of ‘sizeof’ to incomplete type ‘BIGNUM {aka struct bignum_st}’
return sizeof(BIGNUM);
^
ossl_bn.c: In function ‘ossl_bn_s_generate_prime’:
ossl_bn.c:769:5: warning: ‘BN_generate_prime’ is deprecated [-Wdeprecated-declarations]
if (!BN_generate_prime(result, num, safe, add, rem, NULL, NULL)) {
^
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/include/openssl/x509.h:23,
from /usr/include/openssl/x509v3.h:14,
from ossl.h:58,
from ossl_bn.c:11:
/usr/include/openssl/bn.h:285:1: note: declared here
DEPRECATEDIN_0_9_8(BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
^
ossl_bn.c: In function ‘ossl_bn_is_prime’:
ossl_bn.c:877:5: warning: ‘BN_is_prime’ is deprecated [-Wdeprecated-declarations]
switch (BN_is_prime(bn, checks, NULL, ossl_bn_ctx, NULL)) {
^
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/include/openssl/x509.h:23,
from /usr/include/openssl/x509v3.h:14,
from ossl.h:58,
from ossl_bn.c:11:
/usr/include/openssl/bn.h:291:1: note: declared here
DEPRECATEDIN_0_9_8(int
^
ossl_bn.c: In function ‘ossl_bn_is_prime_fasttest’:
ossl_bn.c:916:5: warning: ‘BN_is_prime_fasttest’ is deprecated [-Wdeprecated-declarations]
switch (BN_is_prime_fasttest(bn, checks, NULL, ossl_bn_ctx, NULL, do_trial_division)) {
^
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/include/openssl/x509.h:23,
from /usr/include/openssl/x509v3.h:14,
from ossl.h:58,
from ossl_bn.c:11:
/usr/include/openssl/bn.h:295:1: note: declared here
DEPRECATEDIN_0_9_8(int
^
ossl_bn.c: In function ‘ossl_bn_size’:
ossl_bn.c:44:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:301: recipe for target 'ossl_bn.o' failed
【问题讨论】:
-
你能得到
cat /tmp/ruby-build.20170818162042.1074.log的结果吗?
标签: ruby-on-rails ubuntu-16.04