首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Fedora 15上安装ruby-1.8.7时出错

在Fedora 15上安装ruby-1.8.7时出错
EN

Stack Overflow用户
提问于 2011-05-26 14:17:30
回答 5查看 7.8K关注 0票数 26

使用RVM,在安装Fedora 15之后,我尝试安装ree-1.8.7-2011.03,但得到以下错误。在Ubuntu11.04上使用rvm install ree-1.8.7-2011.03运行良好。

与Fedora 15上的MRI ruby-1.8.7-p334相同的错误(和解决方案)。

对如何解决这个问题有什么想法吗?

代码语言:javascript
复制
make[1]: Entering directory `/home/ryguy/.rvm/src/ree-1.8.7-2011.03/source/ext/dl'
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR    -I. -fPIC -g -O2   -fno-defer-pop -fno-omit-frame-pointer  -c ptr.c
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR    -I. -fPIC -g -O2   -fno-defer-pop -fno-omit-frame-pointer  -c handle.c
Generating callback.func
Generating cbtable.func
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR    -I. -fPIC -g -O2   -fno-defer-pop -fno-omit-frame-pointer  -c dl.c
In file included from dl.c:104:0:
callback.func:1:1: warning: data definition has no type or storage class [enabled by default]
callback.func:1:7: error: expected identifier or ‘(’ before ‘long’
In file included from dl.c:104:0:
callback.func:78:33: error: expected ‘)’ before ‘(’ token
callback.func:79:3: warning: data definition has no type or storage class [enabled by default]
callback.func:79:24: error: ‘proc’ undeclared here (not in a function)
callback.func:79:39: error: ‘argc’ undeclared here (not in a function)
callback.func:79:45: error: ‘argv’ undeclared here (not in a function)
callback.func:82:1: error: expected identifier or ‘(’ before ‘}’ token
dl.c:106:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘static’
make[1]: *** [dl.o] Error 1
make[1]: Leaving directory `/home/ryguy/.rvm/src/ree-1.8.7-2011.03/source/ext/dl'
make: *** [all] Error 1
EN

回答 5

Stack Overflow用户

发布于 2011-06-12 18:33:39

在Fedora 15中使用rvm安装ruby-1.8.7时也会发生这种情况。

Reinier Balt的答案也是有效的,在我的例子中,我必须使用yum安装系统范围的ruby。

下面是我所做的:

代码语言:javascript
复制
cd ~/.rvm/src/ruby-1.8.7-p334/ext/dl
ruby mkcallback.rb > callback.func
ruby mkcbtable.rb > cbtable.func
票数 28
EN

Stack Overflow用户

发布于 2011-06-09 21:34:22

我也看到了这个

我进入src/ext/dl目录,手动生成callback.func和cbtable.func,它们都不完整。我不得不这么做

代码语言:javascript
复制
rm callback.func
touch callback.func
ruby mkcallback.rb >> callback.func

(对cbtable重复)

不知何故,简单的ruby mkcallback.rb > callback.func不起作用。

然后重新运行rvm install 1.8.7,它不会覆盖您的更改。

票数 14
EN

Stack Overflow用户

发布于 2011-07-27 22:03:25

https://bugs.ruby-lang.org/issues/5108

[tl;dr:查看底部的补丁]

票数 14
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6134456

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档