使用捆绑安装时发生错误:nokogiri安装错误

问题描述

我正在使用ubuntu,当我使用捆绑安装时,安装nokogiri时出现错误。我该如何解决?

gem_make.out:

At top level:
xslt_stylesheet.c:112:13: warning: ‘swallow_superfluous_xml_errors’ defined but not used [-Wunused-function]
  112 | static void swallow_superfluous_xml_errors(void * userdata,xmlErrorPtr error,...)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
linking shared-object nokogiri/nokogiri.so
Cleaning files only used during build.
rm -rf /home/domke89/.rvm/gems/ruby-2.7.0/gems/nokogiri-1.10.10/ports/archives

current directory: /home/domke89/.rvm/gems/ruby-2.7.0/gems/nokogiri-1.10.10/ext/nokogiri
make "DESTDIR=" install
make: /usr/bin/mkdir: Command not found
make: *** [Makefile:202: .sitearchdir.-.nokogiri.time] Error 127

make install failed,exit code 2

解决方法

似乎在this issue的Nokogiri Github上也处理了类似的问题。

从讨论中看来,您的机器上的Ruby和Rubygems配置似乎有一些问题。

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...