termux에서 "msfconsole 및 번들 설치"를 실행하는 동안 오류가 발생했습니다. - Android

termux에서 "msfconsole 및 번들 설치"를 실행하는 동안 오류가 발생했습니다. - Android

"bundle install" 명령을 실행하는 동안 다음 오류가 발생합니다.

그래서 "msfconsole"을 실행하고 다음을 얻습니다.

   $ msfconsole                                    waiting for server to shut down....2019-05-08 11:04:55.057 AEST [14797] LOG:  received fast shutdown request
2019-05-08 11:04:55.058 AEST [14797] LOG:  aborting any active transactions
2019-05-08 11:04:55.059 AEST [14797] LOG:  background worker "logical replication launcher" (PID 14807) exited with exit code 1
2019-05-08 11:04:55.060 AEST [14802] LOG:  shutting down
2019-05-08 11:04:55.091 AEST [14797] LOG:  database system is shut down
 done
server stopped
waiting for server to start....2019-05-08 11:04:55.204 AEST [17104] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2019-05-08 11:04:55.204 AEST [17104] LOG:  listening on Unix socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"
2019-05-08 11:04:55.221 AEST [17108] LOG:  database system was shut down at 2019-05-08 11:04:55 AEST
2019-05-08 11:04:55.226 AEST [17104] LOG:  database system is ready to accept connections
 done
server started

Could not find nokogiri-1.10.1 in any of the sources
    Run `bundle install` to install missing gems.

그런 다음 "번들 설치"를 실행하고 다음을 얻습니다.

$ bundle install                                The Gemfile specifies no dependencies
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$

"nokogiri"도 설치하려고 했지만 세 가지 오류가 발생했습니다.

    $install nokogiri                          Building native extensions. This could take a while...
ERROR:  Error installing nokogiri:
        ERROR: Failed to build gem native extension.

    current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.3/ext/nokogiri
/data/data/com.termux/files/usr/bin/ruby -I /data/data/com.termux/files/usr/lib/ruby/site_ruby/2.6.0 -r ./siteconf20190508-18809-1xe5kij.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
Static linking is disabled.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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.
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/2.6.0/extensions/aarch64-linux/2.6.0/nokogiri-1.10.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.3 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/extensions/aarch64-linux/2.6.0/nokogiri-1.10.3/gem_make.out
$

왜 이런 일이 발생합니까? 어떻게 해결할 수 있나요?

답변1

zlib개발 패키지를 설치해야 합니다 .

pkg install zlib-dev

관련 정보