我正在尝试安装 vagrant (1.5.1) 的rackspace 插件:
vagrant plugin install vagrant-rackspace
但它提示
Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is:
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.
但是 gem install nokogiri -v '1.6.1'
和 /Applications/Vagrant/embedded/bin/gem install nokogiri -v '1.6.1'
都可以工作.
我看过一堆 SO 主题和博客文章。我尝试过但没有成功的事情
- 运行
xcode-select --install
- 安装完整的 xcode
- brew 安装 gcc-4.2
- 删除 rvm 和 ruby 的 rvm 版本
- 安装 nokogiri w/内置 (mac) ruby 和 vagrant-embedded ruby
尽管事实上 nokogiri 在没有 sudo 的情况下安装得很好(上面#5),vagrant plugin install vagrant-rackspace
仍然失败...
所以,总而言之,我可以安装 nokogiri 插件,但是我无法安装 vagrantrackspace 插件,你能帮我安装该插件吗?
相关主题
最佳答案
我在 OSX Mavericks 上,这对我有用:
设置为环境属性:
NOKOGIRI_USE_SYSTEM_LIBRARIES=1
然后照常安装:
vagrant plugin install vagrant-rackspace
关于plugins - Vagrant无法安装依赖nokogiri的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22413689/