[Vagrant & VirtualBox] Chef: vagrant-omnibus や knife solo prepare を利用すると wget が 404 error
chef のバージョンを上げたら動かなくなりました。
[markdown]
## 症状
このような形で wget 時に ERROR 404 が発生してこけます。
“`prettyprinted
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
:
trying wget…
trying curl…
ERROR 404
Unable to retrieve a valid package!
Please file a bug report at http://tickets.opscode.com
Project: Chef
Component: Packages
Label: Omnibus
Version: 11.16.2
:
“`
## 対処
ググった感じでは、どうも chef のバージョンが上がると、良く起こる問題らしいです。
今回の最新バージョン 11.16.2 でも以下のイシューがありました。
> * [Additional Download Problems · Issue #96 · schisamo/vagrant-omnibus](https://github.com/schisamo/vagrant-omnibus/issues/96)
### Gemfile
プロジェクトディレクトリでバンドルインストールします。
“`prettyprinted
% bundle init
“`
バージョンを 11.16.0 に固定します。
“`ruby:Gemfile
source “https://rubygems.org”
gem “chef”, “11.16.0”
“`
インストールします。
“`prettyprinted
% bundle
“`
### Vagrantfile
vagrant-omnibus を利用している場合は、ファイル内でバージョン指定します。
“`ruby:Vagrantfile
config.omnibus.chef_version = “11.6.0”
“`
以上で解決しました。
[/markdown]