Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/54.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 正在检查curlinfo\u appconnect\u时间…***extconf.rb失败***_Ruby On Rails_Macos_Rubygems - Fatal编程技术网

Ruby on rails 正在检查curlinfo\u appconnect\u时间…***extconf.rb失败***

Ruby on rails 正在检查curlinfo\u appconnect\u时间…***extconf.rb失败***,ruby-on-rails,macos,rubygems,Ruby On Rails,Macos,Rubygems,在构建过程中,我遇到了这个错误 ERROR: Failed to build gem native extension. current directory: /Users/someuser/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/curb-0.9.3/ext /Users/someuser/.fastlane/bin/bundle/bin/ruby -r ./siteconf20170712-26044-1w4zaqi.rb ext

在构建过程中,我遇到了这个错误

ERROR: Failed to build gem native extension.

    current directory: /Users/someuser/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/curb-0.9.3/ext
/Users/someuser/.fastlane/bin/bundle/bin/ruby -r ./siteconf20170712-26044-1w4zaqi.rb extconf.rb
checking for curl-config... yes
checking for curlinfo_appconnect_time... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  
You may
需要配置选项

然后,我查找了每个
mkmf.log
文件,我在我的主目录中找到了这个文件:

~/.gem/extensions/x86_64-darwin-16/2.4.0/curb-0.9.3/mkmf.log
查看此文件并搜索
curlinfo\u appconnect\u time
时,我看到以下内容:

have_constant: checking for curlinfo_appconnect_time... -------------------- yes

"clang -o conftest -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/x86_64-darwin16 -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/ruby/backward -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0 -I.  -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens  -fno-common -pipe  -g conftest.c  -L. -L/usr/local/Cellar/ruby/2.4.1_1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib     -lruby.2.4.1  -lpthread -ldl -lobjc  -lcurl"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"clang -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/x86_64-darwin16 -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/ruby/backward -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0 -I.  -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens  -fno-common -pipe  -g  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens  -fno-common -pipe  -g -lpthread -ldl -lobjc  -lcurl -c conftest.c"
clang: warning: -lpthread: 'linker' input unused
clang: warning: -ldl: 'linker' input unused
clang: warning: -lobjc: 'linker' input unused
clang: warning: -lcurl: 'linker' input unused
conftest.c:5:13: warning: unused variable 'test' [-Wunused-variable]
        int test = (int)CURLINFO_APPCONNECT_TIME;
            ^
1 warning generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3:       #include <curl/curl.h>
4:       int main() {
5:         int test = (int)CURLINFO_APPCONNECT_TIME;
6:         return 0;
7:       }
/* end */

--------------------
have\u constant:检查curlinfo\u appconnect\u time…----------------------对
“clang-o conftest-I/usr/local/cillar/ruby/2.4.1_1/include/ruby-2.4.0/x86_64-darwin16-I/usr/local/cillar/ruby/2.4.1_1/include/ruby-2.4.0/ruby/backward-I/usr/local/cillar/ruby/ruby/2.4.1/1/include/ruby-2.4.0-I/usr/local/opt/libyaml/include-I/usr/local/usr/local/local/opt/opt/opt-I/usr/readr/local/opt/open/ssl/include-I/ssl-I/usr/usr/ssl/usr/usr/ssl/l/lARWIN_UNLIMITED_SELECT-D_REENTRANT-O3-fno快速数学-ggdb3-Wall-Wextra-Wno未使用参数-Wno括号-Wno long-Wno缺少字段初始值设定项-Wno重言式比较-Wno括号相等-Wno常量逻辑操作数-Wno自赋值-Wunused变量-Wimplicit-Wpointer arith-Wwrite字符串-wdecaration-after-s声明-Wshorten-64-to-32-Wimplicit函数声明-Wdivision by zero-Wdeprecated声明-Wextra令牌-fno common-pipe-g conftest.c-L-L-L/usr/local/ceral/ruby/2.4.1_1/lib-L/usr/local/opt/libyaml-L/usr/local/opt/openssl/lib-L/usr/local/opt/readline/lib-L-L-L-fstack-protector-L/usr/usr/optib-L/usr/local/opt/openssl/lib-L/usr/local/opt/readline/lib-lruby.2.4.1-lpthread-ldl-lobjc-lcurl”
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2:
3:int main(int argc,字符**argv)
4: {
5:返回0;
6: }
/*结束*/
“clang-I/usr/local/ceral/ruby/2.4.1_1/include/ruby-2.4.0/x86_64-darwin16-I/usr/local/ceral/ruby/2.4.1_1/include/ruby-2.4.0/ruby/backward-I/usr/ceral/ruby/2.4.1_1/include/ruby-2.4.0-I-I/usr/local/opt/libyaml/libyaml/include-I/usr/local/local/opt/ssl/ssl/include-I/usr/local/local/opt/ssl/ssl/open/include-I/usr/open/usr/local/local/local/open/open/open/open-l/TED_SELECT-D_可重入-O3-fno快速数学-ggdb3-Wall-Wextra-Wno未使用参数-Wno括号-Wno long-Wno缺失字段初始值设定项-Wno重言式比较-Wno括号相等-Wno常量逻辑操作数-Wno自赋值-Wunused变量-Wimplicit int-Wpointer arith-Wwrite strings-Wdecraration after语句-Wshorten-64-to-32-Wimplicit函数声明-Wdivision by zero-Wdeprecated声明-Wextra令牌-fno common-pipe-g-O3-fno fast math-ggdb3-Wall-Wextra-Wno unused参数-Wno括号-Wno long-Wno缺失字段初始值设定项-Wno重言式比较-Wno括号相等-Wno常量逻辑操作数-Wno自-assign-Wunused变量-Wimplicit int-Wpointer arith-Wwrite strings-Wdeclaration after语句-Wshorten-64-to-32-Wimplicit函数声明-Wdivision by zero-Wdeprecated声明-Wextra令牌-fno common-pipe-g-lpthread-ldl-lobjc-lcurl-c conftest.c“
叮当声:警告:-lpthread:“链接器”输入未使用
叮当声:警告:-ldl:“链接器”输入未使用
叮当声:警告:-lobjc:“链接器”输入未使用
叮当声:警告:-lcurl:“链接器”输入未使用
conftest.c:5:13:警告:未使用的变量“test”[-Wunused变量]
int test=(int)CURLINFO\u APPCONNECT\u TIME;
^
生成1个警告。
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2:
3:#包括
4:int main(){
5:int test=(int)CURLINFO\u APPCONNECT\u TIME;
6:返回0;
7:       }
/*结束*/
--------------------

这对我来说似乎没问题。我对整个MacOS都比较陌生,所以需要帮助。我应该在哪里寻找解决此问题的方法?

请记录,您可以尝试brew:

brew install gcc@4.9

为了记录在案,您可以尝试brew:

brew install gcc@4.9