美文网首页
nokogiri 安装错误, Bundler无法继续 -----

nokogiri 安装错误, Bundler无法继续 -----

作者: 茉茉杨 | 来源:发表于2020-09-02 14:10 被阅读0次

nokogiri 安装错误, Bundler无法继续 -----处理过程

root@JD:/home/genieacs/genieacs-gui# sudo bundle

sudo: unable to resolve host JD

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application

for all non-root users on this machine.

Warning: the running version of Bundler (1.16.1) is older than the version that created the lockfile (1.16.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

Fetching gem metadata from https://rubygems.org/.

............

Using rake 12.3.1

Using concurrent-ruby 1.0.5

Using i18n 1.1.1

Using minitest 5.11.3

Using thread_safe 0.3.6

Using tzinfo 1.2.5

Using activesupport 5.2.1

Using builder 3.2.3

Using erubi 1.7.1

Using mini_portile2 2.3.0

Fetching nokogiri 1.8.5

Installing nokogiri 1.8.5 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri

/usr/bin/ruby2.5 -r ./siteconf20200902-19135-83sw86.rb extconf.rb

checking if the C compiler accepts ... yes

Building nokogiri using packaged libraries.

Using mini_portile version 2.3.0

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.

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=/usr/bin/$(RUBY_BASE_NAME)2.5

--help

--clean

--use-system-libraries

--enable-static

--disable-static

--with-zlib-dir

--without-zlib-dir

--with-zlib-include

--without-zlib-include=${zlib-dir}/include

--with-zlib-lib

--without-zlib-lib=${zlib-dir}/lib

--enable-cross-build

--disable-cross-build

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/nokogiri-1.8.5 for inspection.

Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.5/gem_make.out

An error occurred while installing nokogiri (1.8.5), and Bundler cannot continue.

Make sure that `gem install nokogiri -v '1.8.5'` succeeds before bundling.

In Gemfile:

  rails was resolved to 5.2.1, which depends on

    actioncable was resolved to 5.2.1, which depends on

      actionpack was resolved to 5.2.1, which depends on

        actionview was resolved to 5.2.1, which depends on

          rails-dom-testing was resolved to 2.0.3, which depends on

            nokogiri

root@JD:/home/genieacs/genieacs-gui#

***************************解决办法***********************************

执行:sudo apt-get install libxslt-dev libxml2-dev        ----ok

再次运行 :sudo bundle

=======================================================

执行以上问题后 ,再次遇到 安装  ‘sass’  问题:

提示如下:

Post-install message from sass:

Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new

  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the

  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:

  http://sass.logdown.com/posts/7081811

***************************解决办法***********************************

执行:gem install sassc     (安装时长需等待几分钟哦)

再次运行 :sudo bundle        ---安装完成

‘sassc ’参考文档:

https://github.com/sass/sassc-ruby/blob/master/README.md

相关文章

网友评论

      本文标题:nokogiri 安装错误, Bundler无法继续 -----

      本文链接:https://www.haomeiwen.com/subject/texwsktx.html