I was trying to set up a Virtual Machine, and when I ran a command to fix an error, it said to install headers. So I try the command

"sudo apt-get install linux-headers-$(uname -r)"

And I get the message

"Package 'linux-headers' is not installed, so not removed"

I tried to replace (uname -r) with what I get when I enter that command, and I get an error "Unable to locate package." I run a Debian Linux Stretch (commands that start with deb don't work though). I've tried to reboot the computer too. I get from "uname -r"


I'm not sure where I'm going wrong with this.

  • Umm, my output from uname -r on Debian Stretch is: 4.9.0-8-amd64. How did you install Debian, and from where? – maulinglawns Feb 18 at 19:06
  • The computer came with the Debian, I think. I can open and install .deb files, and the computer lists its Linux as Debian. – ヤイシイYy Feb 18 at 19:13
  • I found a similar issue with Debian, try to check this link, maybe it helps: unix.stackexchange.com/questions/19898/… – Moreno Feb 18 at 19:14
  • Please post the output of: lsb_release -a, and uname -a – maulinglawns Feb 18 at 19:17
  • Lsb gave me: Distro ID: Debian; Description: Debian GNU/Linux 9.5; Release 9.5; Codename "stretch" – ヤイシイYy Feb 18 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.