Nokogiri不能用RVM安装在RR上

请帮帮我! 我有一个系统的FreeBSD 10,我在RVM上安装了rvm和ruby。

[glafir@ ~/RoR/fips]$ whereis rvm
rvm: /home/glafir/.rvm/bin/rvm /home/glafir/.rvm/man/man1/rvm.1 /usr/ports/archivers/rvm
[glafir@ ~/RoR/fips]$ whereis ruby
ruby: /home/glafir/.rvm/rubies/ruby-2.1.1/bin/ruby


[glafir@ ~/RoR/fips]$ rvm -v
rvm 1.25.25 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

[glafir@ ~/RoR/fips]$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-freebsd10.0]

我尝试安装gem nokogiri,并且出现此错误:

gem install nokogiri
...
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
...

我已经安装了libxml2。

[glafir@ ~/RoR/fips]$ pkg info -a |grep libxml2
libxml2-2.8.0_5                XML parser library for GNOME

我的mkmf.log ... ...找不到libiconv的包配置find_header:检查libxml / parser.h ... --------------------是

"cc -E -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libxml/parser.h>
/* end */

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

find_header: checking for libxslt/xslt.h... -------------------- yes

"cc -E -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libxslt/xslt.h>
/* end */

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

find_header: checking for libexslt/exslt.h... -------------------- yes

"cc -E -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libexslt/exslt.h>    
"cc -E -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libxslt/xslt.h>
/* end */

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

find_header: checking for libexslt/exslt.h... -------------------- yes

"cc -E -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <libexslt/exslt.h>
/* end */

--------------------
/* end */

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

have_func: checking for iconv_open() in iconv.h... -------------------- no

"cc -o conftest -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 conftest.c  -L. -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -Wl,-R/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -fstack-protector -rdynamic -L/usr/local/lib  -Wl,-R/usr/local/lib  -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -L/usr/local/lib     -lxslt -lz -lm -lxml2 -lxml2 -Wl,-R -Wl,/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -lruby  -lxslt -lz -lm -lxml2 -lxml2 -lexecinfo -lthr -lcrypt -lm   -lc "
/tmp/conftest-CEfMFx.o: In function `t':
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ext/nokogiri/conftest.c:15: undefined reference to `libiconv_open'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <iconv.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 ((*)()))iconv_open; return 0; }
/* end */

"cc -o conftest -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 conftest.c  -L. -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -Wl,-R/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -fstack-protector -rdynamic -L/usr/local/lib  -Wl,-R/usr/local/lib  -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -L/usr/local/lib     -lxslt -lz -lm -lxml2 -lxml2 -Wl,-R -Wl,/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -lruby  -lxslt -lz -lm -lxml2 -lxml2 -lexecinfo -lthr -lcrypt -lm   -lc "
conftest.c:15:26: error: too few arguments to function call, expected 2, have 0
int t(void) { iconv_open(); return 0; }
              ~~~~~~~~~~ ^
/usr/local/include/iconv.h:73:1: note: 'libiconv_open' declared here
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <iconv.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) { iconv_open(); return 0; }
/* end */

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

have_library: checking for iconv_open() in -liconv... -------------------- yes

"cc -o conftest -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 conftest.c  -L. -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -Wl,-R/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -fstack-protector -rdynamic -L/usr/local/lib  -Wl,-R/usr/local/lib  -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -L/usr/local/lib     -lxslt -lz -lm -lxml2 -lxml2 -Wl,-R -Wl,/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -lruby -liconv  -lxslt -lz -lm -lxml2 -lxml2 -lexecinfo -lthr -lcrypt -lm   -lc "
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <iconv.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 ((*)()))iconv_open; return 0; }
/* end */

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

find_library: checking for xmlParseDoc() in -lxml2... -------------------- no

"cc -o conftest -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 conftest.c  -L. -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -Wl,-R/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -fstack-protector -rdynamic -L/usr/local/lib  -Wl,-R/usr/local/lib  -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -L/usr/local/lib    -liconv  -lxslt -lz -lm -lxml2 -lxml2 -Wl,-R -Wl,/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -lruby -lxml2 -liconv  -lxslt -lz -lm -lxml2 -lxml2 -lexecinfo -lthr -lcrypt -lm   -lc "
conftest.c:13:57: error: use of undeclared identifier 'xmlParseDoc'
int t(void) { void ((*volatile p)()); p = (void ((*)()))xmlParseDoc; return 0; }
                                                        ^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))xmlParseDoc; return 0; }
/* end */

"cc -o conftest -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/x86_64-freebsd10.0 -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0/ruby/backward -I/home/glafir/.rvm/rubies/ruby-2.1.1/include/ruby-2.1.0 -I. -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include/libxml2 -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/include -I/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/include  -I/usr/local/include    -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 -Wextra-tokens  -fPIC  -g -DXP_UNIX -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26"' -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 conftest.c  -L. -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -Wl,-R/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -L/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -Wl,-R/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -fstack-protector -rdynamic -L/usr/local/lib  -Wl,-R/usr/local/lib  -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib -Wl,-rpath,/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxslt/1.1.26/lib -L/usr/local/lib -L/usr/local/lib    -liconv  -lxslt -lz -lm -lxml2 -lxml2 -Wl,-R -Wl,/home/glafir/.rvm/rubies/ruby-2.1.1/lib -L/home/glafir/.rvm/rubies/ruby-2.1.1/lib -lruby -lxml2 -liconv  -lxslt -lz -lm -lxml2 -lxml2 -lexecinfo -lthr -lcrypt -lm   -lc "
conftest.c:13:15: warning: implicit declaration of function 'xmlParseDoc' is invalid in C99 [-Wimplicit-function-declaration]
int t(void) { xmlParseDoc(); return 0; }
              ^
1 warning generated.
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib/libxml2.a(xzlib.o): In function `is_format_xz':
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-unknown-freebsd10.0/ports/libxml2/2.8.0/libxml2-2.8.0/xzlib.c:271: undefined reference to `lzma_properties_decode'
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib/libxml2.a(xzlib.o): In function `xz_head':
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-unknown-freebsd10.0/ports/libxml2/2.8.0/libxml2-2.8.0/xzlib.c:366: undefined reference to `lzma_auto_decoder'
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib/libxml2.a(xzlib.o): In function `xz_decomp':
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-unknown-freebsd10.0/ports/libxml2/2.8.0/libxml2-2.8.0/xzlib.c:532: undefined reference to `lzma_code'
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ports/x86_64-unknown-freebsd10.0/libxml2/2.8.0/lib/libxml2.a(xzlib.o): In function `__libxml2_xzclose':
/usr/home/glafir/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-unknown-freebsd10.0/ports/libxml2/2.8.0/libxml2-2.8.0/xzlib.c:741: undefined reference to `lzma_end'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: int t(void) { xmlParseDoc(); return 0; }
/* end */

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

帮我! 请帮帮我!


尝试使用--在nokogiri和额外路径之后:

gem install nokogiri -- --use-system-libraries --with-xml2-lib=/usr/local/lib 
--with-xml2-include=/usr/local/include/libxml2/libxml --with-xslt-lib=/usr/local/lib 
--with-xslt-include=/usr/local/include/libxslt --with-iconv-lib=/usr/local/lib 
--with-iconv-include=/usr/local/include

注意:上述命令可以在FreeBSD 9.2上使用libiconv成功运行(FreeBSD 10.0的iconv内置于world / base)

链接地址: http://www.djcxy.com/p/61061.html

上一篇: Nokogiri not installing in RoR with RVM freeBSD

下一篇: Nokogiri gem fails to install in OS X Mavericks