Skip to content

Conversation

@rich-murray
Copy link

Installation on Ubuntu 16.04 fails with error shown below. The apt key has been updated for Ubuntu 16.04 and Debian 8 (see https://www.virtualbox.org/wiki/Linux_Downloads). I updated the default recipe to use an attribute for the apt_repository key. In the default attributes file I've set the key to the appropriate value if the platform_version is Ubuntu 16.04 but I could have just left this as an attribute for anyone to override (I wasn't sure of the best approach as I'm not an expert on Chef).

I updated the chef spec test for the default recipe. I also had to amend spec/spec_helper.rb to avoid a NoMethodError on color_enabled. I assume this is because I'm using a newer version of chefspec (I'm using chefdk 0.16.28), hope that's OK.

==> default: * apt_package[virtualbox-5.1] action install
==> default:
==> default: ================================================================================
==> default: Error executing action install on resource 'apt_package[virtualbox-5.1]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install virtualbox-5.1=5.1.4-110228Ubuntuxenial ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following additional packages will be installed:
==> default: libqt5x11extras5 libsdl-ttf2.0-0 libsdl1.2debian
==> default: The following NEW packages will be installed:
==> default: libqt5x11extras5 libsdl-ttf2.0-0 libsdl1.2debian virtualbox-5.1
==> default: 0 upgraded, 4 newly installed, 0 to remove and 99 not upgraded.
==> default: Need to get 65.1 MB of archives.
==> default: After this operation, 158 MB of additional disk space will be used.
==> default: WARNING: The following packages cannot be authenticated!
==> default: virtualbox-5.1
==> default: STDERR: E: There were unauthenticated packages and -y was used without --allow-unauthenticated
==> default: ---- End output of apt-get -q -y install virtualbox-5.1=5.1.4-110228Ubuntuxenial ----
==> default: Ran apt-get -q -y install virtualbox-5.1=5.1.4-110228Ubuntuxenial returned 100
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in run_action' ==> default: ==> default: Resource Declaration: ==> default: --------------------- ==> default: # In /var/chef/cache/cookbooks/virtualbox/recipes/default.rb ==> default: ==> default: 54: package "virtualbox-#{node['virtualbox']['version']}" ==> default: 55: package 'dkms' ==> default: ==> default: Compiled Resource: ==> default: ------------------ ==> default: # Declared in /var/chef/cache/cookbooks/virtualbox/recipes/default.rb:54:infrom_file'
==> default:
==> default: apt_package("virtualbox-5.1") do
==> default: package_name "virtualbox-5.1"
==> default: action [:install]
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: declared_type :package
==> default: cookbook_name "virtualbox"
==> default: recipe_name "default"
==> default: end
==> default:
==> default: Platform:
==> default: ---------
==> default: x86_64-linux
==> default:
==> default:
==> default: Running handlers:
==> default: [2016-08-22T09:35:42+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2016-08-22T09:35:42+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 8 resources updated in 26 seconds
==> default: [2016-08-22T09:35:42+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2016-08-22T09:35:42+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2016-08-22T09:35:42+00:00] ERROR: apt_package[virtualbox-5.1](virtualbox::default line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install virtualbox-5.1=5.1.4-110228Ubuntuxenial ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following additional packages will be installed:
==> default: libqt5x11extras5 libsdl-ttf2.0-0 libsdl1.2debian
==> default: The following NEW packages will be installed:
==> default: libqt5x11extras5 libsdl-ttf2.0-0 libsdl1.2debian virtualbox-5.1
==> default: 0 upgraded, 4 newly installed, 0 to remove and 99 not upgraded.
==> default: Need to get 65.1 MB of archives.
==> default: After this operation, 158 MB of additional disk space will be used.
==> default: WARNING: The following packages cannot be authenticated!
==> default: virtualbox-5.1
==> default: STDERR: E: There were unauthenticated packages and -y was used without --allow-unauthenticated
==> default: ---- End output of apt-get -q -y install virtualbox-5.1=5.1.4-110228Ubuntuxenial ----
==> default: Ran apt-get -q -y install virtualbox-5.1=5.1.4-110228Ubuntuxenial returned 100
==> default: [2016-08-22T09:35:44+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

@dayne
Copy link

dayne commented Jan 29, 2017

Bump - This pull request appears it would have fixed the same issue I was having on my Ubuntu 16.04 system.

@dayne
Copy link

dayne commented Feb 12, 2017

Tackled this problem and a few other things in:
#25

@chris-orchard chris-orchard mentioned this pull request Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants