sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
201 stars 266 forks source link

chef10, apt/providers/repository.rb:56: syntax error, unexpected ':', expecting ')' #165

Closed bitphage closed 9 years ago

bitphage commented 9 years ago

On chef version 10.18.0-1 OS Ubuntu 12.04.1 LTS I'm getting the following error:

[Thu, 08 Oct 2015 17:12:22 +0500] ERROR: Running exception handlers
[Thu, 08 Oct 2015 17:12:22 +0500] FATAL: Saving node information to /var/cache/chef/failed-run-data.json
[Thu, 08 Oct 2015 17:12:22 +0500] ERROR: Exception handlers complete
[Thu, 08 Oct 2015 17:12:22 +0500] ERROR: SyntaxError: compile error
/var/cache/chef/cookbooks/apt/providers/repository.rb:56: syntax error, unexpected ':', expecting ')'
...Mixlib::ShellOut.new(cmd, env: { 'LANG' => 'en_US', 'LANGUAG...
                              ^
/var/cache/chef/cookbooks/apt/providers/repository.rb:56: syntax error, unexpected ')', expecting kEND
/var/cache/chef/cookbooks/apt/providers/repository.rb:69: syntax error, unexpected ':', expecting ')'
...Mixlib::ShellOut.new(cmd, env: { 'LANG' => 'en_US', 'LANGUAG...
                              ^
/var/cache/chef/cookbooks/apt/providers/repository.rb:69: syntax error, unexpected ')', expecting kEND
[Thu, 08 Oct 2015 17:12:22 +0500] FATAL: Stacktrace dumped to /var/cache/chef/chef-stacktrace.out
[Thu, 08 Oct 2015 17:12:22 +0500] ERROR: Sleeping for 1800 seconds before trying again
thommay commented 9 years ago

You'll need to upgrade to a supported version of chef (10.x is out of support and has been for approximately a year), or downgrade to an earlier version of the cookbook, that still supports chef 10 and ruby 1.8 (which is also deprecated and has been for some time). Sorry.