首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在共享VirtualBox文件夹上安装Gem失败

在共享VirtualBox文件夹上安装Gem失败
EN

Stack Overflow用户
提问于 2014-03-13 22:16:27
回答 2查看 684关注 0票数 3

有一个Windows主机和一个使用VirtualBox的Ubuntu来宾。

我们可以在Ubuntu上为单独的gem安装gem。运行时

代码语言:javascript
复制
bundle install --path vendor

对于Ubuntu中的共享文件夹上的应用程序,它会失败,并显示。

代码语言:javascript
复制
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb 
/var/www/chef-playground/vendor/ruby/2.1.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:226: warning: Insecure world writable dir /opt/chef/embedded/bin in PATH, mode 040777
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-linux-gnu/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1/ports/x86_64-linux-gnu/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-linux-gnu/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... OK
Running 'install' for libxslt 1.1.26... OK
Activating libxslt 1.1.26 (from /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1/ports/x86_64-linux-gnu/libxslt/1.1.26)...
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile

Text file busy @ unlink_internal - ./siteconf20140313-27134-167s4eq.rb

Gem files will remain installed in /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1 for inspection.
Results logged to /var/www/chef-playground/vendor/ruby/2.1.0/extensions/x86_64-linux/2.1.0/nokogiri-1.6.1/gem_make.out
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling
EN

回答 2

Stack Overflow用户

发布于 2014-03-25 04:21:35

堆栈跟踪的最后一行提供了解释。

代码语言:javascript
复制
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling

当我在Fedora20上使用它时,我遇到了同样的错误。在nokogiri站点上有一个很好的解释来解决这个问题。

我运行了以下两个命令,然后bundle install就工作了:

代码语言:javascript
复制
sudo yum install -y rubygem-nokogiri
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
票数 0
EN

Stack Overflow用户

发布于 2017-08-17 04:20:16

这可能是因为:

代码语言:javascript
复制
Text file busy @ unlink_internal - ./siteconf20140313-27134-167s4eq.rb

这显然是一个关于共享文件夹、Virtualbox和Windows主机的现有问题。他们似乎一直在指责Window的侵略性文件处理。

https://github.com/mitchellh/vagrant/issues/2282

Ansible text file busy error

https://unix.stackexchange.com/questions/52951/gedit-wont-save-a-file-on-a-virtualbox-share-text-file-busy

您可以尝试一个变通方法,将gem安装在来宾计算机上的某个位置,而不是安装在您的共享文件夹中,例如,将gem安装在您的主目录中:bundle install --path ~/vendor。您可能需要重新配置.bundle/config,以确保指向正确的目录。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22381369

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档