Mysql 在cloud9上安装mongrel时出错
我正在运行下面的命令来安装mongrel(将应用程序的ruby降级为1.8.7p302,当尝试进行bundle-create--local时,它会要求安装mysql,后者随后要求安装mongrel)Mysql 在cloud9上安装mongrel时出错,mysql,ruby-on-rails,ruby,cloud9-ide,Mysql,Ruby On Rails,Ruby,Cloud9 Ide,我正在运行下面的命令来安装mongrel(将应用程序的ruby降级为1.8.7p302,当尝试进行bundle-create--local时,它会要求安装mysql,后者随后要求安装mongrel) gem安装win32-open3-v“0.3.2” (master) $ gem install mongrel -v '1.1.5' Building native extensions. This could take a while... ERROR: Error installing m
gem安装win32-open3-v“0.3.2”
(master) $ gem install mongrel -v '1.1.5'
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150509-1034-1akenv5.rb extconf.rb
checking for main() in -lc... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling http11.c
http11.c: In function ‘http_field’:
http11.c:70:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(flen, FIELD_NAME);
^
http11.c:71:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(vlen, FIELD_VALUE);
^
http11.c:77:22: error: ‘struct RString’ has no member named ‘ptr’
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
^
http11.c:77:50: error: ‘struct RString’ has no member named ‘len’
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
^
http11.c:77:27: warning: left-hand operand of comma expression has no effect [-Wunused-value]
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
^
http11.c: In function ‘request_uri’:
http11.c:102:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, REQUEST_URI);
^
http11.c: In function ‘fragment’:
http11.c:113:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, FRAGMENT);
^
http11.c: In function ‘request_path’:
http11.c:124:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, REQUEST_PATH);
^
http11.c: In function ‘query_string’:
http11.c:135:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, QUERY_STRING);
^
In file included from /usr/include/string.h:635:0,
from /usr/local/rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby/defines.h:45,
from /usr/local/rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby/ruby.h:29,
from /usr/local/rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby.h:33,
from http11.c:5:
http11.c: In function ‘header_done’:
http11.c:172:33: error: ‘struct RString’ has no member named ‘ptr’
colon = strchr(RSTRING(temp)->ptr, ':');
^
http11.c:172:33: error: ‘struct RString’ has no member named ‘ptr’
colon = strchr(RSTRING(temp)->ptr, ':');
^
http11.c:172:33: error: ‘struct RString’ has no member named ‘ptr’
colon = strchr(RSTRING(temp)->ptr, ':');
^
http11.c:174:89: error: ‘struct RString’ has no member named ‘ptr’
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
^
http11.c:176:52: error: ‘struct RString’ has no member named ‘ptr’
rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
^
http11.c:177:26: error: ‘struct RString’ has no member named ‘len’
RSTRING(temp)->len));
^
http11.c: In function ‘HttpParser_execute’:
http11.c:298:23: error: ‘struct RString’ has no member named ‘ptr’
dptr = RSTRING(data)->ptr;
^
http11.c:299:23: error: ‘struct RString’ has no member named ‘len’
dlen = RSTRING(data)->len;
^
http11.c:307:5: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(http_parser_nread(http), HEADER);
^
make: *** [http11.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.5@rails4/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.5@rails4/extensions/x86_64-linux/2.1.0/mongrel-1.1.5/gem_make.out
(主版)$gem安装mongrel-v'1.1.5'
构建本机扩展。这可能需要一段时间。。。
错误:安装mongrel时出错:
错误:无法生成gem本机扩展。
/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby-r./siteconf20150509-1034-1akenv5.rb extconf.rb
正在检查-lc中的main()。。。对
创建Makefile
使“DESTDIR=”干净
使“DESTDIR=”
编译http11.c
http11.c:在函数“http_字段”中:
http11.c:70:3:警告:格式不是字符串文字,也没有格式参数[-Wformat security]
验证最大长度(flen,字段名称);
^
http11.c:71:3:警告:格式不是字符串文字,也没有格式参数[-Wformat security]
验证最大长度(vlen,字段值);
^
http11.c:77:22:错误:“struct RString”没有名为“ptr”的成员
对于(ch=RSTRING(f)->ptr,end=ch+RSTRING(f)->len;chptr,end=ch+RSTRING(f)->len;chptr,end=ch+RSTRING(f)->len;chptr':');
^
http11.c:172:33:错误:“struct RString”没有名为“ptr”的成员
冒号=strchr(RSTRING(temp)->ptr':');
^
http11.c:172:33:错误:“struct RString”没有名为“ptr”的成员
冒号=strchr(RSTRING(temp)->ptr':');
^
http11.c:174:89:错误:“struct RString”没有名为“ptr”的成员
rb_hash_aset(请求、全局服务器名称、rb_str_substr(temp、0、冒号-RSTRING(temp)->ptr));
^
http11.c:176:52:错误:“struct RString”没有名为“ptr”的成员
rb_str_substr(临时,冒号-RSTRING(临时)->ptr+1,
^
http11.c:177:26:错误:“struct RString”没有名为“len”的成员
RSTRING(temp)->len);
^
http11.c:在函数“HttpParser_execute”中:
http11.c:298:23:错误:“struct RString”没有名为“ptr”的成员
dptr=RSTRING(数据)->ptr;
^
http11.c:299:23:错误:“struct RString”没有名为“len”的成员
dlen=RSTRING(数据)->len;
^
http11.c:307:5:警告:格式不是字符串文字,也没有格式参数[-Wformat security]
验证最大长度(http解析器读取(http),头);
^
make:**[http11.o]错误1
make失败,退出代码2
Gem文件仍将安装在/usr/local/rvm/gems/ruby-2.1中。5@rails4/gems/mongrel-1.1.5用于检查。
结果记录到/usr/local/rvm/gems/ruby-2.1。5@rails4/extensions/x86_64-linux/2.1.0/mongrel-1.1.5/gem_make.out
将cd转到/usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11
并在http11.c上使用sudo nano或vi,以及:
将第77行替换为
对于(ch=RSTRING_PTR(f),end=ch+RSTRING_LEN(f);ch这对我有效,希望t也能对你有效。既然你想安装MySQL,你看过了吗:?我不明白MySQL为什么要安装mongrel