rbenv安装ruby遇到的问题

发布于 2022-08-29 16:31:57 字数 2915 浏览 23 评论 0

今天我本机(ubuntu14)的开发环境rbenv安装ruby时突然遇到如下错误,有大神知道怎么解决吗?
我本机已经确认装过openssl以及libssl1.0.0,libssl-dev

$rbenv install 2.0.0-p247
Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /home/grant/.rbenv/versions/2.0.0-p247

Downloading ruby-2.0.0-p247.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/3e71042872c77726409460e8647a2f304083a15ae0defe90d8000a69917e20d3
Installing ruby-2.0.0-p247...

BUILD FAILED

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

Last 10 log lines:
compiling ossl_hmac.c
compiling ossl_x509store.c
compiling ossl_pkcs12.c
compiling ossl_pkey_dh.c
compiling ossl_x509name.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: Leaving directory `/tmp/ruby-build.20140607140231.15470/ruby-2.0.0-p247/ext/openssl'
make[1]: Leaving directory `/tmp/ruby-build.20140607140231.15470/ruby-2.0.0-p247'
make: *** [build-ext] Error 2

/tmp/ruby-build.20140607140231.15470.log

make[2]: Leaving directory `/tmp/ruby-build.20140607140231.15470/ruby-2.0.0-p247/ext/racc/cparse'
make[2]: Entering directory `/tmp/ruby-build.20140607140231.15470/ruby-2.0.0-p247/ext/readline'
compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1886:26: error: ‘Function’ undeclared (first use in this function)
     rl_pre_input_hook = (Function *)readline_pre_input_hook;
                          ^
readline.c:1886:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1886:36: error: expected expression before ‘)’ token
     rl_pre_input_hook = (Function *)readline_pre_input_hook;
                                    ^
readline.c: At top level:
readline.c:530:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
 readline_pre_input_hook(void)
 ^
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20140607140231.15470/ruby-2.0.0-p247/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling ossl_ocsp.c
compiling ossl_x509attr.c
compiling openssl_missing.c
compiling ossl_ssl_session.c
compiling ossl.c
compiling ossl_pkey_dsa.c
compiling ossl_x509.c
compiling ossl_pkey.c
compiling ossl_pkey_ec.c
compiling ossl_hmac.c
compiling ossl_x509store.c
compiling ossl_pkcs12.c
compiling ossl_pkey_dh.c
compiling ossl_x509name.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: Leaving directory `/tmp/ruby-build.20140607140231.15470/ruby-2.0.0-p247/ext/openssl'
make[1]: Leaving directory `/tmp/ruby-build.20140607140231.15470/ruby-2.0.0-p247'
make: *** [build-ext] Error 2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文