Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Ubuntu 14.04 Fails to install kernel headers #335

Closed
philk opened this issue Apr 1, 2015 · 2 comments
Closed

Latest Ubuntu 14.04 Fails to install kernel headers #335

philk opened this issue Apr 1, 2015 · 2 comments

Comments

@philk
Copy link

philk commented Apr 1, 2015

The latest version of the ubuntu-14.04 box (as downloaded today) fails if you need to install linux-headers-generic (unspecified version) because the package doesn't exist upstream for 3.13.0.37.44.

I have an older box from Oct 17 10:55 that works fine with the same recipes (we discovered this on a new workstation). Copying that box to the new workstation works just fine.

Working box ohai kernel:

  "release": "3.13.0-24-generic",
  "version": "#46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014",

Failing box ohai kernel:

  "release": "3.13.0-24-generic",
  "version": "#47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014",

As you may notice from that ohai output...it makes no sense. It is, however, easily reproducible with a recipe that has:

apt_package "linux-headers-generic" do
  action :install
end

Here's the relevant part of our log output

       Recipe: usb_redirect::client
         * apt_package[libusb-dev] action install
           - install version 2:0.1.12-23.3ubuntu1 of package libusb-dev
         * apt_package[linux-headers-generic] action install

           ================================================================================
           Error executing action `install` on resource 'apt_package[linux-headers-generic]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '100'
           ---- Begin output of apt-get -q -y install linux-headers-generic=3.13.0.37.44 ----
           STDOUT: Reading package lists...
           Building dependency tree...
           Reading state information...
           The following extra packages will be installed:

           The following NEW packages will be installed:
             linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic
             linux-headers-generic
           0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
           Need to get 9617 kB of archives.
           After this operation, 76.7 MB of additional disk space will be used.
           Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-37 all 3.13.0-37.64 [8893 kB]
           Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-37-generic amd64 3.13.0-37.64 [722 kB]
           Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-generic amd64 3.13.0.37.44
             404  Not Found [IP: 91.189.91.15 80]
           Err http://security.ubuntu.com/ubuntu/ trusty-security/main linux-headers-generic amd64 3.13.0.37.44
             404  Not Found [IP: 91.189.91.15 80]
           Fetched 9615 kB in 13s (708 kB/s)


           E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
           ---- End output of apt-get -q -y install linux-headers-generic=3.13.0.37.44 ----
           Ran apt-get -q -y install linux-headers-generic=3.13.0.37.44 returned 100

       Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/usb_redirect/recipes/client.rb

            28:   package pkg do
            29:     action :install
            30:   end
        31: end

           Compiled Resource:
           ------------------
       # Declared in /tmp/kitchen/cache/cookbooks/usb_redirect/recipes/client.rb:28:in `block in from_file'

           apt_package("linux-headers-generic") do
             action [:install]
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             package_name "linux-headers-generic"
             version "3.13.0.37.44"
         timeout 900
             declared_type :package
             cookbook_name "usb_redirect"
             recipe_name "client"
           end


       Running handlers:
       [2015-04-01T18:24:17+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2015-04-01T18:24:17+00:00] ERROR: Exception handlers complete
       [2015-04-01T18:24:17+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       Chef Client failed. 15 resources updated in 170.682258984 seconds
       [2015-04-01T18:24:17+00:00] ERROR: apt_package[linux-headers-generic] (usb_redirect::client line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
       ---- Begin output of apt-get -q -y install linux-headers-generic=3.13.0.37.44 ----
       STDOUT: Reading package lists...
       Building dependency tree...
       Reading state information...
       The following extra packages will be installed:
         linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic
       The following NEW packages will be installed:
         linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic
         linux-headers-generic
       0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
       Need to get 9617 kB of archives.
       After this operation, 76.7 MB of additional disk space will be used.
       Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-37 all 3.13.0-37.64 [8893 kB]
       Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-37-generic amd64 3.13.0-37.64 [722 kB]
       Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-generic amd64 3.13.0.37.44
         404  Not Found [IP: 91.189.91.15 80]
       Err http://security.ubuntu.com/ubuntu/ trusty-security/main linux-headers-generic amd64 3.13.0.37.44
         404  Not Found [IP: 91.189.91.15 80]
       Fetched 9615 kB in 13s (708 kB/s)
       STDERR: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux-meta/linux-headers-generic_3.13.0.37.44_amd64.deb  404  Not Found [IP: 91.189.91.15 80]

       E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
       ---- End output of apt-get -q -y install linux-headers-generic=3.13.0.37.44 ----
       Ran apt-get -q -y install linux-headers-generic=3.13.0.37.44 returned 100
       [2015-04-01T18:24:19+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@juliandunn
Copy link
Contributor

You need to apt-get update before running package resources on Ubuntu operating systems. The default recipe in the [http://github.com/opscode-cookbooks/apt](apt cookbook) will do this for you.

@philk
Copy link
Author

philk commented Apr 1, 2015

Wow...this'll teach me to file issues before coffee. That plus one other fix to one of our recipes (forcing the version of linux-headers-generic based on ohai info) was the solution. Thanks!

@philk philk closed this as completed Apr 1, 2015
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

No branches or pull requests

2 participants