Skip to content
This repository has been archived by the owner on Jun 11, 2018. It is now read-only.

The Berkshelf version at "/opt/chefdk/bin/berks" is invalid #57

Open
hiasel opened this issue Sep 25, 2016 · 8 comments
Open

The Berkshelf version at "/opt/chefdk/bin/berks" is invalid #57

hiasel opened this issue Sep 25, 2016 · 8 comments
Labels

Comments

@hiasel
Copy link

hiasel commented Sep 25, 2016

Hello,

i am on Mac OS X 10.11.6 and after following the installation instructions and running vagrant up i get the following error:

The Berkshelf version at "/opt/chefdk/bin/berks" is invalid.
Vagrant Berkshelf requires ~> 4.0, but the current version is 5.1.0.

Please download and install the latest version of the ChefDK from:

https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.

The ChefDK binaries are added to my path
echo $PATH: /opt/chefdk/bin:/Users/hmk/.chefdk/gem/ruby/2.3.0/bin:/opt/chefdk/embedded/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/chefdk/gitbin

vagrant -v: Vagrant 1.8.5
which berks: /opt/chefdk/bin/berks
chef -v:
Chef Development Kit Version: 0.18.26
chef-client version: 12.14.89
delivery version: master (d86679335580be3de22996ef294b20d525889d8d)
berks version: 5.1.0
kitchen version: 1.13.0

I found a similar Issue Description here. I also tried completely reinstalling chefdk, vagrant but nothing helps.

@microweb10
Copy link

microweb10 commented Sep 26, 2016

Yeah,

I am having the same issue on Ubuntu 14.04 after upgrading chefDK and vagrant to the latest. Previously same Vagrant file was working fine

$ chef -v
Chef Development Kit Version: 0.18.26
chef-client version: 12.14.89
delivery version: master (d86679335580be3de22996ef294b20d525889d8d)
berks version: 5.1.0
kitchen version: 1.13.0

$ vagrant -v
Vagrant 1.8.5

$ vagrant plugin update
Updating installed plugins...
All plugins are up to date.

$ vagrant up default
Bringing machine 'default' up with 'virtualbox' provider...
The Berkshelf version at "/usr/bin/berks" is invalid.
Vagrant Berkshelf requires ~> 4.0, but the current version is 5.1.0.

Please download and install the latest version of the ChefDK from:

https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.

@rohit-nsit08
Copy link

facing the same issue.

@microweb10
Copy link

Actually I guess this is more a berks issue than a vagrant issue.
link to vagrant-berkshelf issue 305

@microweb10
Copy link

microweb10 commented Sep 27, 2016

While they fix it I found a workaround that at least works for me.

Edit this file
~/.vagrant.d/gems/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/action/check.rb

where you see:
BERKS_REQUIREMENT = "~> 4.0"
change it to:
BERKS_REQUIREMENT = ">= 4.0"

As I said this is just a workaround.

@whyzdev
Copy link

whyzdev commented Sep 30, 2016

same problem on Windows. Thanks to the workaround given by @microweb10 above. It works after editing the version in /Users/[username]/.vagrant.d/gems/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/action/check.rb.

@mazinmk
Copy link

mazinmk commented Feb 22, 2017

I am facing this problem with Mac OS X 10.11

$ vagrant up
using vagrant-berkshelf
using vagrant-omnibus
using vagrant-hosts
Bringing machine 'default' up with 'virtualbox' provider...
The Berkshelf version at "/opt/chefdk/bin/berks" is invalid.
Vagrant Berkshelf requires >= 4.0, but the current version is .

Please download and install the latest version of the ChefDK from:

https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.

$ echo $PATH
/opt/chefdk/bin:/Users/apple/.chefdk/gem/ruby/2.3.0/bin:/opt/chefdk/embedded/bin:/Users/apple/Downloads/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/chefdk/gitbin

$ vagrant -v
Vagrant 1.9.1

$ chef -v
Chef Development Kit Version: 1.2.22
chef-client version: 12.18.31
delivery version: master (0b746cafed65a9ea1a79de3cc546e7922de9187c)
berks version: 2017-02-22T21:22:41.975660 1289] 2017-02-22T21:22:41.975832 1289] 2017-02-22T21:22:41.975985 1289] 2017-02-22T21:22:41.976105 1289] 2017-02-22T21:22:42.016310 1289] 2017-02-22T21:22:42.016450 1289] 5.6.0
kitchen version: 1.15.0

$ vagrant plugin list
vagrant-berkshelf (5.1.1)
vagrant-cachier (1.2.1)

  • Version Constraint: > 0
    vagrant-hosts (2.8.0)
  • Version Constraint: > 0
    vagrant-omnibus (1.5.0)
  • Version Constraint: > 0
    vagrant-share (1.1.6)
  • Version Constraint: > 0

$ which berks
/opt/chefdk/bin/berks

$ vagrant plugin update
Updating installed plugins...
The Vagrant Berkshelf plugin requires Berkshelf from the Chef Development Kit.
You can download the latest version of the Chef Development Kit from:

https://downloads.chef.io/chef-dk/

Installing Berkshelf via other methods is not officially supported.
All plugins are up to date.

$ cat ~/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.1.1/lib/vagrant-berkshelf/action/check.rb
........

BERKS_REQUIREMENT = ">= 4.0"

Still I am getting the error. Is there anything I am missing ?

@jeffbyrnes
Copy link

@mazinmk this is an issue with vagrant-berkshelf, not this project. Please take a look at berkshelf/vagrant-berkshelf#316.

@mazinmk
Copy link

mazinmk commented Feb 23, 2017

@jeffbyrnes Thank you. The above link as the fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants