2009-06-11 54 views
0

我有成功的执行以下命令:
在CentOS中安装ruby fastCGI绑定时出错。如何避免呢〜> _ <〜

tar xzvf fcgi-2.4.0.tar.gz 
cd fcgi-2.4.0 
./configure --prefix=/usr/local/fcgi 
make && make install 


tar xzvf ruby-fcgi-0.8.7.tar.gz 
cd ruby-fcgi-0.8.7 
ruby install.rb config -- --with-fcgi-include=/usr/local/fcgi/include --with-fcgi-lib=/usr/local/fcgi/lib 


但是当我运行安装脚本我得到这个错误:

ruby install.rb setup 

install.rb: entering setup phase... 
---> lib 
<--- lib 
---> ext 
---> ext/fcgi 
make 
gcc -I. -I/usr/local/ruby/include/ruby-1.9.1/i686-linux -I/usr/local/ruby/include/ruby-1.9.1/ruby/backward -I/usr/local/ruby/include/ruby-1.9.1 -I/root/ruby-fcgi-0.8.6/ext/fcgi -DHAVE_FCGIAPP_H -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses -o fcgi.o -c fcgi.c 
fcgi.c: In function `fcgi_stream_write': 
fcgi.c:215: error: structure has no member named `ptr' 
fcgi.c:215: error: structure has no member named `len' 
fcgi.c: In function `fcgi_stream_puts_ary': 
fcgi.c:264: error: structure has no member named `len' 
fcgi.c:265: error: structure has no member named `ptr' 
fcgi.c:266: warning: implicit declaration of function `rb_inspecting_p' 
fcgi.c: In function `fcgi_stream_puts': 
fcgi.c:290: warning: implicit declaration of function `rb_protect_inspect' 
fcgi.c:298: error: structure has no member named `ptr' 
fcgi.c:298: error: structure has no member named `len' 
fcgi.c: In function `fcgi_stream_gets': 
fcgi.c:372: error: structure has no member named `len' 
fcgi.c: In function `fcgi_s_accept': 
fcgi.c:85: warning: statement with no effect 
make: *** [fcgi.o] 错误 1 
setup failed 
'system make' failed 
try 'ruby install.rb --help' for usage 

回答

0

我很确定ruby-fcgi不适用于Ruby 1.9。它于2006年发布。

+0

谢谢!我要试试这个:http://blog.rubyists.com/2009/06/02/ruby-fcgi-on-1-9x – dexteryy 2009-06-11 16:46:16