Apt cache search linux headers

Debian User Forums

I’m trying to get VMWare going, but it’s going slowly. Right now it wants to know where the matching kernel headers are. Now, what do I tell it?

By the way, I tried installing linux-kernel-headers, guess what apt-get told me?!

mzilikazi Forum Account
Posts: 3282 Joined: 2004-09-16 02:14 Location: Colorado Springs, CO

Re: kernel-headers location

#2 Post by mzilikazi » 2009-09-11 02:42

# apt-cache search linux-kernel-headers linux-libc-dev - Linux support headers for userspace development
# apt-get install linux-headers-$(uname -r)

Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

Re: kernel-headers location

#3 Post by Wed » 2009-09-11 03:03

But what path do I give VMware? If you already gave a clue, I missed it.

Re: kernel-headers location

#4 Post by AdrianTM » 2009-09-11 03:15

VMWare will find the path automatically at most you might need to link the headers to /usr/src/linux but I’m not positive that’s needed anymore. In case it’s needed the command looks like this:

ln -s /usr/src/linux-headers-$(uname -r) /usr/src/linux

But again, that’s probably not needed.

Re: kernel-headers location

#5 Post by Wed » 2009-09-11 03:23

Nope. The VMware installer says: Kernel headers for version kernel xxxx were not found, and so on. I was given an option to browse for them. /usr/src however is empty, no linux directory in there.

Any specific file I can try to locate?

Re: kernel-headers location

#6 Post by AdrianTM » 2009-09-11 04:46

Re: kernel-headers location

#7 Post by Wed » 2009-09-11 08:56

Note, selecting linux-libc-dev instead of linux-kernel-headers linux-libc-dev is already the newest version.

Either it is installed, but not in /usr/src/, or it isn’t installed and the top statement is false. So, is there any specific files I may search for?

Re: kernel-headers location

#8 Post by fsmithred » 2009-09-11 11:33

You can use the command that mzilikazi suggested to find out whether the package is installed or not.

# apt-get install linux-headers-$(uname -r)

This will either install the right package, tell you that you already have the latest version, or may give some error output.

Other things you could try:
aptitude search linux-headers — any packages that are installed will be on a line that starts with «i» and ones that aren’t installed will be on lines that start with «p».
aptitude show linux-headers-$(uname -r) -will show information about the header package for your running kernel. If it’s installed, you’ll see a line that says «State: installed». That’s a good one to do, because it also tells you where the headers get installed.

Читайте также:  Merge tool for linux

Re: kernel-headers location

#9 Post by bugsbunny » 2009-09-11 12:59

Note, selecting linux-libc-dev instead of linux-kernel-headers linux-libc-dev is already the newest version.

Either it is installed, but not in /usr/src/, or it isn’t installed and the top statement is false. So, is there any specific files I may search for?

1) There is no conflict. They’re different things. However the fact that /usr/src is completely empty does indicate that you didn’t install the linux-headers- package
2) The /usr/src/linux link is not needed (in fact it can be dangerous to use that link at times since if you have multiple kernel versions installed you can’t be sure, without checking, which version it’s pointing to). It’s a carryover from older times.
3) The link that should be being used is: /libs/modules//build
4) Why do people insist on fighting with vmware. Virtualbox installs flawlessly, Debian is an officially supported distribution, and for the large majority of cases will work just fine. There may be some situations where you need vmware workstation I suppose, but not too many (possibly, if you’re working with a large enterprise situation, but even there it depends on your exact needs). IMHO (You’d still need the headers package though).

Re: kernel-headers location

#10 Post by Wed » 2009-09-13 09:50

Thanks a lot fsmithred, and mzilikazi, should have ventured down that path the first time it was suggested.

bugsbunny wrote: 1) There is no conflict. They’re different things. However the fact that /usr/src is completely empty does indicate that you didn’t install the linux-headers- package

Well i interpreted the two as the as the same. When I install a package, I expect the package to be installed. If it is replaced, I naturally expect it to be equivalent.

2) The /usr/src/linux link is not needed (in fact it can be dangerous to use that link at times since if you have multiple kernel versions installed you can’t be sure, without checking, which version it’s pointing to). It’s a carryover from older times.

Yes, that’s what the installer finally found after the package I wanted to install, actually was installed.

4) Why do people insist on fighting with vmware. Virtualbox installs flawlessly, Debian is an officially supported distribution, and for the large majority of cases will work just fine. There may be some situations where you need vmware workstation I suppose, but not too many (possibly, if you’re working with a large enterprise situation, but even there it depends on your exact needs). IMHO (You’d still need the headers package though).

I already run Virtualbox. It’s working fine. But I’m the inquisitive kind of guy, and I like looking around.

Читайте также:  Make file in linux example

Источник

Not finding linux headers for 4.10.0-28-generic

screenshot

Ubuntu is having trouble finding generic linux headers for 4.10.0-28. What can I do to resolve this? Output of cat /etc/apt/sources.list

remus@linux:/var/log$ cat /etc/apt/sources.list # deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu xenial partner deb http://security.ubuntu.com/ubuntu bionic-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://security.ubuntu.com/ubuntu bionic-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://security.ubuntu.com/ubuntu bionic-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse 

I’ll highly suggest you to kindly replace screenshot with text with code formatting. It will only take up a while and will benefit future readers too. Thanks 🙂

Please don’t post text as a screenshot. search engines (including the stack exchange ones) can’t index it, we can’t copy it, blind people can’t have it screen read to them. Text should be represented as text 😉

Источник

Install linux-headers on debian unable to locate package

I am trying to install the linux-headers for my Kernel Version 3.4.61+ and Debian Version 7.1 I typed this Commands:

apt-get update apt-get install linux-headers-$(uname -r) 
E: Unable to locate package linux-headers-3.4.61 E: Couldn't find any package by regex 'linux-headers-3.4.61' 

Use «apt-cache search linux-headers-» to get a list of all available headers, then you can choose one that fits best.

Читайте также:  Freeing memory in linux

@leeduhem i found the solution. i just typed apt-get -f install after that i tried again with apt-get install linux-headers-3.2.0-4-all voila it worked!

6 Answers 6

Here’s what you may need to do

sudo apt-get update # This will update the repositories list sudo apt-get upgrade # This will update all the necessary packages on your system sudo apt-get dist-upgrade # This will add/remove any needed packages reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot sudo apt-get install linux-headers-$(uname -r) # This should work now 

I did all the things, but still I couldn’t. root@h1:~# apt-get install linux-headers-$(uname -r) Reading package lists. Done Building dependency tree Reading state information. Done E: Unable to locate package linux-headers-5.4.34-1-pve E: Couldn’t find any package by glob ‘linux-headers-5.4.34-1-pve’ E: Couldn’t find any package by regex ‘linux-headers-5.4.34-1-pve’

root@h1:~# apt-get -y install pve-headers Reading package lists. Done Building dependency tree Reading state information. Done E: Unable to locate package pve-headers

Was running into this in Vagrant, and this did the trick! I had to vagrant reload after running these commands.

You could search first, then choose the closest one.

$ apt-cache search linux-headers linux-headers-3.2.0-4-all - All header files for Linux 3.2 (meta-package) linux-headers-3.2.0-4-all-amd64 - All header files for Linux 3.2 (meta-package) linux-headers-3.2.0-4-amd64 - Header files for Linux 3.2.0-4-amd64 

So I can install any one of these three.

Heres my experience with this problem:

I installed Kali Linux from a live memory stick. Whilst installing I didn’t have an internet connection.

This meant that my sources.list file was set to «Default Off-line Install Values». This meant that when installing I was limited to just the packages and data from the memory stick I Initially installed from.

To fix this, you need to change your sources.list (called switching branches):

This opens the sources file

Now at the top of the file paste in the following two lines:

deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib 

Press CTRL + X then Press Y and Enter to save the file.

Now you can type the following commands to update Kali:

sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade reboot 

And finally, you should now be able to.

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

This is just my unique experience with this error stemming from an offline install. I hope this helps someone else out there.

Источник

Оцените статью
Adblock
detector