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

标签 ruby rvm

使用 RVM,我尝试在安装 Fedora 15 后安装 ree-1.8.7-2011.03,但出现以下错误。在 Ubuntu 11.04 上使用 rvm install ree-1.8.7-2011.03 工作正常..

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

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

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

最佳答案

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

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

这是我做的:

cd ~/.rvm/src/ruby-1.8.7-p334/ext/dl
ruby mkcallback.rb > callback.func
ruby mkcbtable.rb > cbtable.func

关于ruby - 在 Fedora 15 上安装 ruby​​-1.8.7 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6134456/

相关文章:

ruby-on-rails - RVM Ruby on Rails source ~/.rvm/scripts/rvm 没有那个位置

ruby-on-rails - 无法使用 ruby​​ xmpp4r 获取以前的群聊历史记录

ruby - Mongoid:如何实现嵌入式文档之间的关系?

ruby-on-rails - RoR,我应该如何建模?

ruby - 无法将 Ruby Sinatra 应用程序作为 systemd 单元启动 - 找不到 gem

ruby - 如何从用 qt4 编写的 ruby​​ 应用程序创建 debian 包 (*.deb)?

ruby :RVM 安装错误 "Could not source..."

ruby - If 语句不适用于 Ruby 中的 gets()

ruby - SignatureDoesNotMatch - 查询字符串参数(AWS 签名版本 4)

ruby-on-rails - bash :/home/XXX/. rvm/scripts/rvm: 没有那个文件或目录