简体   繁体   English

捆绑软件安装失败(错误:安装nokogiri时出错:错误:无法构建gem本机扩展)

[英]bundle install failed (ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension)

I'm a newbi to ruby I have trouble executing the command : 我是ruby的新手,我在执行命令时遇到了麻烦:

bundle install

I'm using FEDORA28 and have installed ruby with rvm but apparently something is missing or a permission is wrong but I don't get it. 我正在使用FEDORA28,并用rvm安装了ruby,但显然缺少某些内容或权限错误,但我不明白。 I have this answer : 我有这个答案:

Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.6
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.3
Using activesupport 5.1.3
Using builder 3.2.3
Using erubi 1.6.1
Using mini_portile2 2.2.0
Fetching nokogiri 1.8.0
Installing nokogiri 1.8.0 with native extensions
Errno::EACCES: Permission denied @ rb_sysopen -
/home/BFournier/Documents/Boris/rothenberg/benchmark-headless-chrome- 
vs-phantomjs/vendor/bundle/ruby/2.5.0/extensions/x86_64- 
linux/2.5.0/nokogiri-1.8.0/gem_make.out
An error occurred while installing nokogiri (1.8.0), and Bundler 
cannot continue.
Make sure that `gem install nokogiri -v '1.8.0' --source 
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 5.1.3, which depends on
    actioncable was resolved to 5.1.3, which depends on
      actionpack was resolved to 5.1.3, which depends on
        actionview was resolved to 5.1.3, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            nokogiri

and when I try to execute this : 当我尝试执行此操作时:

gem install nokogiri -v '1.8.0' --source 'https://rubygems.org/'

I have this : 我有这个 :

ERROR:  Error installing nokogiri:
ERROR: Failed to build gem native extension.

current directory: /home/BFournier/.gem/ruby/gems/nokogiri- 
1.8.0/ext/nokogiri
/usr/bin/ruby -r ./siteconf20181129-21800-1ke3w2r.rb extconf.rb
checking if the C compiler accepts ... *** 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.

I found some similar questions but everything i'e tried didn't work at the moment. 我发现了一些类似的问题,但我目前尝试的所有方法均无法正常工作。 thanks in advance for any clues. 在此先感谢您提供任何线索。

Silly me that was so simple I hate myself. 愚蠢的我是如此简单,我讨厌自己。 It was just that I've probably installed something with sudo and the permission was only for ROOT user so I've just changed the right of the file and that's it. 仅仅是因为我可能已经使用sudo安装了某些东西,并且该权限仅适用于ROOT用户,所以我只是更改了文件的权限,仅此而已。 Thanks again for your help @drosam 再次感谢您的帮助@drosam

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:安装nokogiri时出错:错误:无法构建gem本机扩展 - ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension nokogiri - 错误:无法构建 gem 原生扩展 - nokogiri - ERROR: Failed to build gem native extension 套件安装错误:错误:无法建立gem本机扩展 - Bundle install error : ERROR: Failed to build gem native extension 错误:无法在OSX 10.9.4上构建gem本机扩展(捆绑安装) - ERROR: Failed to build gem native extension (bundle install) on OSX 10.9.4 nokogiri gem - 错误:无法构建 gem 本机扩展。 - nokogiri gem - ERROR: Failed to build gem native extension. gem install mailcatcher 失败 - 错误:安装 mailcatcher 时出错:错误:无法构建 gem 本机扩展 - gem install mailcatcher fails with - ERROR: Error installing mailcatcher: ERROR: Failed to build gem native extension 安装 nokogiri 时出错:无法构建 gem 本机扩展并且缺少 libiconv (OSX) - Error installing nokogiri: Failed to build gem native extension & libiconv is missing (OSX) 错误:安装pg时出错:错误:无法构建gem原生扩展 - ERROR: Error installing pg: ERROR: Failed to build gem native extension 错误:安装 racc 时出错:错误:无法构建 gem 原生扩展 - ERROR: Error installing racc: ERROR: Failed to build gem native extension 错误:安装mysql时出错:错误:无法构建gem本机扩展 - ERROR: Error installing mysql: ERROR: Failed to build gem native extension
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM