2016-11-24 235 views
1

我試圖在Sierra上安裝Nokogiri,並得到一個錯誤消息,告訴我檢查mkmf.log。 ?什麼我需要做的就是引入nokogiri正確安裝以下是mkmf.log文件的內容:在macOS Sierra上安裝Nokogiri時出錯

"gcc -o conftest -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/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 -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe conftest.c -L. -L/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib  -lruby.2.3.0 -lpthread -ldl -lobjc " 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main(int argc, char **argv) 
4: { 
5: return 0; 
6: } 
/* end */ 

"gcc -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/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 -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -Werror -c conftest.c" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main() {return 0;} 
/* end */ 

"gcc -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/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 -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -Werror -c conftest.c" 
error: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Werror,-Wunknown-warning-option] 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main() {return 0;} 
/* end */ 

have_header: checking for iconv.h... -------------------- yes 

"gcc -E -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/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 -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -o conftest.i" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <iconv.h> 
/* end */ 

-------------------- 

have_library: checking for gzdopen() in -lz... -------------------- yes 

"gcc -o conftest -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/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 -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -L. -L/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib  -lruby.2.3.0 -lz -lpthread -ldl -lobjc " 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <zlib.h> 
4: 
5: /*top*/ 
6: extern int t(void); 
7: int main(int argc, char **argv) 
8: { 
9: if (argc > 1000000) { 
10:  printf("%p", &t); 
11: } 
12: 
13: return 0; 
14: } 
15: int t(void) { void ((*volatile p)()); p = (void ((*)()))gzdopen; return !p; } 
/* end */ 

-------------------- 

have_iconv?: checking for iconv using --with-opt-* flags... -------------------- yes 

"gcc -o conftest -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/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 -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -L. -L/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib  -lruby.2.3.0 -lpthread -ldl -lobjc " 
Undefined symbols for architecture x86_64: 
    "_iconv", referenced from: 
     _main in conftest-d220a5.o 
    "_iconv_open", referenced from: 
     _main in conftest-d220a5.o 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <stdlib.h> 
4: #include <iconv.h> 
5: 
6: int main(void) 
7: { 
8:  iconv_t cd = iconv_open("", ""); 
9:  iconv(cd, NULL, NULL, NULL, NULL); 
10:  return EXIT_SUCCESS; 
11: } 
/* end */ 

"gcc -o conftest -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/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 -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -L. -L/Users/pdenlinger/.rvm/rubies/ruby-2.3.1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib  -lruby.2.3.0 -liconv -lpthread -ldl -lobjc " 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <stdlib.h> 
4: #include <iconv.h> 
5: 
6: int main(void) 
7: { 
8:  iconv_t cd = iconv_open("", ""); 
9:  iconv(cd, NULL, NULL, NULL, NULL); 
10:  return EXIT_SUCCESS; 
11: } 
/* end */ 

-------------------- 
+0

可能相關:[Nokogiri issue#1258](https://github.com/sparklemotion/nokogiri/issues/1258)。 – Amadan

回答

1

嘗試在終端

xcode-select --install 

問題解決了,我在運行此命令當Nokogiri未能安裝時。

+1

是的,工作。謝謝。 – pdenlinger

相關問題