Ich habe hunger

あふりかエンジニア、アフリカ向けのB2BのSaaSを開発する

vagrant upしたら、「Vagrant::Errors::LinuxMountFailed」ってエラーが出たときの対処【vagrant-vbguestのインストール】

sugi511.hatenablog.com

そう、前回の続き。

プラグインの確認

この環境を作ってくれた人に確認すると、 vagrant-vbguestというvagrantプラグインの利用を前提にしているらしいので、こちらをインストール。

$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
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.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.

なんかnokorigiのインストールのところで止まるとか言われるので、これもインストールするか。

$ gem install nokogiri -v '1.6.6.2'
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.6.6.2
Parsing documentation for nokogiri-1.6.6.2
Done installing documentation for nokogiri after 2 seconds
1 gem installed

そして、vagrant-vbguestを再インストールしようとしたけどまた同じエラー(´・_・`)
さっきのインストールで、nokogiri (1.6.6.2, 1.6.3.1)と共存してるのがダメなのかな?と思い、1.6.3.1をunistallして再チャレンジ。

Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
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.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.

やっぱダメだ:;(∩´﹏`∩);:

vagrant-vbguestプラグイン自体の問題ではなく、そもそもvagrantプラグインをインストールするときのエラーでは、と思ったら下記の記事見つけた。

qiita.com

記事の通り、xcodeの何かをインストール。

$ xcode-select --install
xcode-select: note: install requested for command line developer tools

記事内では何か言われてたけど、何もエラーとかでなかったので、再度vagrant plugin installにチャレンジ₍₍⁽⁽(ી(*゚▽゚*)ʃ)₎₎⁾⁾

$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
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.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.

またダメだ(´・_・`)

さっきの記事に書いてた「-- --use-system-libraries」オプションを付けてinstallする方法してもダメ。

で、次に見つけたのはこんな記事。

blog.hypermkt.jp

なんかいけそう!!w
ブログの通りに・・・

$ gem install --install-dir ~/.vagrant.d/gems  nokogiri -v '1.6.6.2'
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.6.6.2
Parsing documentation for nokogiri-1.6.6.2
Installing ri documentation for nokogiri-1.6.6.2
Done installing documentation for nokogiri after 3 seconds
1 gem installed

これをした後に・・・

$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
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:

Net::HTTPNotFound: No gems found matching "vagrant-vmware-fusion" "3.1.2" nil

エラーメッセージ変わった!!w
でも、これはなんかネットワークの問題だったりして、もう一度チャレンジするといけるパターンって知ってるので・・・

$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbguest (0.10.0)'!

来ました!!やったー₍₍⁽⁽(ી(*゚▽゚*)ʃ)₎₎⁾⁾


と、もともとやりたかったのはvagrant upのエラー解消なので、とりあえずvagrant-vbguestプラグインをインストールするところまでいけました!!

次回はguest addtionsのなんちゃらとかその辺やります(´・_・`)