Nokogiri 1.13.3 Gem 安装失败 Termux
事情是这样的: 我使用这个这个脚本尝试安装Metasploit 6。
但是Nokogiri找不到libm.so。 6 我尝试过 ln -s /system/lib64/libm.so $PREFIX/lib/libm.so.6 来解决这个问题,但它不起作用
经过一些故障排除后,我认为 Nokogiri 可能没有完全安装。
我不确定我错过了哪一部分。 请帮忙 设备:Realme X50
操作系统:Android 10
$ gem install nokogiri --platform=ruby -- --use-system-libraries
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3/ext/nokogiri
/data/data/com.termux/files/usr/bin/ruby -I /data/data/com.termux/files/usr/lib/ruby/3.1.0 -r ./siteconf20220228-27822-xbzj3s.rb extconf.rb --use-system-libraries
checking for whether -std=c99 is accepted as CFLAGS... yes
checking for whether -Wno-declaration-after-statement is accepted as CFLAGS... yes
checking for whether -g is accepted as CFLAGS... yes
checking for whether -Winline is accepted as CFLAGS... yes
checking for whether -Wmissing-noreturn is accepted as CFLAGS... yes
Building nokogiri using system libraries.
checking for gzdopen() in -lz... yes
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
checking for libxml-2.0 using `pkg_config`... yes: ["-I/data/data/com.termux/files/usr/include/libxml2 ", "-L/data/data/com.termux/files/usr/lib", "-lxml2"]
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
Using mini_portile version 2.8.0
---------- IMPORTANT NOTICE ----------
Building Nokogiri with a packaged version of libgumbo-1.0.0-nokogiri.
Configuration options: --enable-shared --disable-static
[]
Copying gumbo-parser files into tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/gumbo-parser...
Running 'compile' for libgumbo 1.0.0-nokogiri... ERROR, review '/data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3/ext/nokogiri/tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/compile.log' to see what happened. Last lines are:
========================================================================
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o foreign_attrs.o foreign_attrs.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o parser.o parser.c
parser.c:540:10: warning: cast to smaller integer type 'GumboInsertionMode' from 'void *' [-Wvoid-pointer-to-enum-cast]
return (GumboInsertionMode) modes->data[(modes->length - 1)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o string_buffer.o string_buffer.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o string_piece.o string_piece.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o svg_attrs.o svg_attrs.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o svg_tags.o svg_tags.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o tag.o tag.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o tag_lookup.o tag_lookup.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o token_buffer.o token_buffer.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o tokenizer.o tokenizer.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o utf8.o utf8.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o util.o util.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o vector.o vector.c
ar rv libgumbo.a ascii.o attribute.o char_ref.o error.o foreign_attrs.o parser.o string_buffer.o string_piece.o svg_attrs.o svg_tags.o tag.o tag_lookup.o token_buffer.o tokenizer.o utf8.o util.o vector.o
make: ar: No such file or directory
make: *** [Makefile:30: libgumbo.a] Error 127
========================================================================
*** 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
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
--help
--clean
--prevent-strip
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-z-dir
--without-z-dir
--with-z-include
--without-z-include=${z-dir}/include
--with-z-lib
--without-z-lib=${z-dir}/lib
--with-zlib
--without-zlib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xml2lib
--without-xml2lib
--with-libxml2-dir
--without-libxml2-dir
--with-libxml2-include
--without-libxml2-include=${libxml2-dir}/include
--with-libxml2-lib
--without-libxml2-lib=${libxml2-dir}/lib
--with-libxml2lib
--without-libxml2lib
--with-libxml-2.0-dir
--without-libxml-2.0-dir
--with-libxml-2.0-include
--without-libxml-2.0-include=${libxml-2.0-dir}/include
--with-libxml-2.0-lib
--without-libxml-2.0-lib=${libxml-2.0-dir}/lib
--with-libxml-2.0-config
--without-libxml-2.0-config
--with-pkg-config
--without-pkg-config
--with-xml2lib
--without-xml2lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-xsltlib
--without-xsltlib
--with-exslt-dir
--without-exslt-dir
--with-exslt-include
--without-exslt-include=${exslt-dir}/include
--with-exslt-lib
--without-exslt-lib=${exslt-dir}/lib
--with-exsltlib
--without-exsltlib
--enable-cross-build
--disable-cross-build
/data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:460:in `block in execute': Failed to complete compile task (RuntimeError)
from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:426:in `chdir'
from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:426:in `execute'
from extconf.rb:968:in `compile'
from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:187:in `cook'
from extconf.rb:528:in `block (2 levels) in process_recipe'
from extconf.rb:309:in `chdir'
from extconf.rb:309:in `chdir_for_build'
from extconf.rb:528:in `block in process_recipe'
from <internal:kernel>:90:in `tap'
from extconf.rb:427:in `process_recipe'
from extconf.rb:927:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/extensions/aarch64-linux-android/3.1.0/nokogiri-1.13.3/mkmf.log
extconf failed, exit code 1
Here's the thing:
I used this this script trying to install Metasploit 6.
But Nokogiri can't find libm.so.6
I've tried ln -s /system/lib64/libm.so $PREFIX/lib/libm.so.6 to solve this problem,but it didn't work
After some troubleshooting,I think Nokogiri might not completely installed.
I'm not sure about which part I've missed.
pls help
Device:Realme X50
OS:Android 10
$ gem install nokogiri --platform=ruby -- --use-system-libraries
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3/ext/nokogiri
/data/data/com.termux/files/usr/bin/ruby -I /data/data/com.termux/files/usr/lib/ruby/3.1.0 -r ./siteconf20220228-27822-xbzj3s.rb extconf.rb --use-system-libraries
checking for whether -std=c99 is accepted as CFLAGS... yes
checking for whether -Wno-declaration-after-statement is accepted as CFLAGS... yes
checking for whether -g is accepted as CFLAGS... yes
checking for whether -Winline is accepted as CFLAGS... yes
checking for whether -Wmissing-noreturn is accepted as CFLAGS... yes
Building nokogiri using system libraries.
checking for gzdopen() in -lz... yes
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
checking for libxml-2.0 using `pkg_config`... yes: ["-I/data/data/com.termux/files/usr/include/libxml2 ", "-L/data/data/com.termux/files/usr/lib", "-lxml2"]
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
Using mini_portile version 2.8.0
---------- IMPORTANT NOTICE ----------
Building Nokogiri with a packaged version of libgumbo-1.0.0-nokogiri.
Configuration options: --enable-shared --disable-static
[]
Copying gumbo-parser files into tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/gumbo-parser...
Running 'compile' for libgumbo 1.0.0-nokogiri... ERROR, review '/data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/nokogiri-1.13.3/ext/nokogiri/tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/compile.log' to see what happened. Last lines are:
========================================================================
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o foreign_attrs.o foreign_attrs.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o parser.o parser.c
parser.c:540:10: warning: cast to smaller integer type 'GumboInsertionMode' from 'void *' [-Wvoid-pointer-to-enum-cast]
return (GumboInsertionMode) modes->data[(modes->length - 1)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o string_buffer.o string_buffer.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o string_piece.o string_piece.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o svg_attrs.o svg_attrs.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o svg_tags.o svg_tags.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o tag.o tag.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o tag_lookup.o tag_lookup.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o token_buffer.o token_buffer.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o tokenizer.o tokenizer.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o utf8.o utf8.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o util.o util.c
aarch64-linux-android-clang -fPIC -g -std=c99 -Wall -c -o vector.o vector.c
ar rv libgumbo.a ascii.o attribute.o char_ref.o error.o foreign_attrs.o parser.o string_buffer.o string_piece.o svg_attrs.o svg_tags.o tag.o tag_lookup.o token_buffer.o tokenizer.o utf8.o util.o vector.o
make: ar: No such file or directory
make: *** [Makefile:30: libgumbo.a] Error 127
========================================================================
*** 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
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
--help
--clean
--prevent-strip
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-z-dir
--without-z-dir
--with-z-include
--without-z-include=${z-dir}/include
--with-z-lib
--without-z-lib=${z-dir}/lib
--with-zlib
--without-zlib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xml2lib
--without-xml2lib
--with-libxml2-dir
--without-libxml2-dir
--with-libxml2-include
--without-libxml2-include=${libxml2-dir}/include
--with-libxml2-lib
--without-libxml2-lib=${libxml2-dir}/lib
--with-libxml2lib
--without-libxml2lib
--with-libxml-2.0-dir
--without-libxml-2.0-dir
--with-libxml-2.0-include
--without-libxml-2.0-include=${libxml-2.0-dir}/include
--with-libxml-2.0-lib
--without-libxml-2.0-lib=${libxml-2.0-dir}/lib
--with-libxml-2.0-config
--without-libxml-2.0-config
--with-pkg-config
--without-pkg-config
--with-xml2lib
--without-xml2lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-xsltlib
--without-xsltlib
--with-exslt-dir
--without-exslt-dir
--with-exslt-include
--without-exslt-include=${exslt-dir}/include
--with-exslt-lib
--without-exslt-lib=${exslt-dir}/lib
--with-exsltlib
--without-exsltlib
--enable-cross-build
--disable-cross-build
/data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:460:in `block in execute': Failed to complete compile task (RuntimeError)
from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:426:in `chdir'
from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:426:in `execute'
from extconf.rb:968:in `compile'
from /data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:187:in `cook'
from extconf.rb:528:in `block (2 levels) in process_recipe'
from extconf.rb:309:in `chdir'
from extconf.rb:309:in `chdir_for_build'
from extconf.rb:528:in `block in process_recipe'
from <internal:kernel>:90:in `tap'
from extconf.rb:427:in `process_recipe'
from extconf.rb:927:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/3.1.0/extensions/aarch64-linux-android/3.1.0/nokogiri-1.13.3/mkmf.log
extconf failed, exit code 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉回复晚了。
我在安装 Rails 时也遇到过类似的问题。
我通过安装
pkg-config
和binutils
解决了这个问题,如下所示:pkg install pkg-config binutils && gem install pkg-config
如果您缺少gumbo,请输入
pkg installgumbo-parser
来安装它。希望这有帮助。
Sorry for the late response.
I've had a similar issue while installing Rails.
I've fixed this by installing
pkg-config
andbinutils
like so:pkg install pkg-config binutils && gem install pkg-config
If you get missing gumbo, install it by typing
pkg install gumbo-parser
.Hope this helps.