LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   apt-get returning: "couldn't find package linux-headers-2.6..." (https://www.linuxquestions.org/questions/linux-distributions-5/apt-get-returning-couldnt-find-package-linux-headers-2-6-a-693503/)

compused 12-28-2008 03:39 PM

apt-get returning: "couldn't find package linux-headers-2.6..."
 
Hello there
The distrubution in use is based on debian & called xandros, running in an "eee pc". I am trying to install an application but am having problem with linux headers. Apt-get update has been run without problems.

The command:
Code:

apt-get install linux-headers-`uname -r`
returns:
Couldn't find package linux-headers-2.6.21.4-eeepc

The file in /boot is consistent with the stated linux version above ie
Code:

/boot/config-2.6.21.4-eeepc
There is a line of text in /boot/config-2.6.21.4-eeepc:
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
that refers to a non-existent file ie there is no:
/lib/modules/2.6.21.4-eeepc/.config

One suggestion from someone with a similar problem in another forum was to run:
Code:

cp /boot/[filename] /usr/src/linux/.config; cd /usr/src/linux; make oldconfig; make
...??? so would it be safe to copy (& rename) /boot/config-2.6.21.4-eeepc to:
Code:

/lib/modules/2.6.21.4-eeepc/.config
and then run:
make oldconfig; make

Also, the command:
Code:

apt-cache search linux-headers
shows no reference to 2.6.21.4, ie:
linux-headers-2.6-486 - Header files for Linux 2.6 on x86
linux-headers-2.6-486-etchnhalf - Header files for Linux 2.6-etchnhalf on x86
linux-headers-2.6-686 - Header files for Linux 2.6 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6-686-bigmem - Header files for Linux 2.6 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6-686-bigmem-etchnhalf - Header files for Linux 2.6-etchnhalf on PPro/Celeron/PII/PIII/P4
linux-headers-2.6-686-etchnhalf - Header files for Linux 2.6-etchnhalf on PPro/Celeron/PII/PIII/P4
linux-headers-2.6-amd64 - Header files for Linux 2.6 on AMD64
linux-headers-2.6-amd64-etchnhalf - Header files for Linux 2.6-etchnhalf on AMD64
linux-headers-2.6-k7 - Header files for Linux 2.6 on AMD K7
linux-headers-2.6-vserver-686 - Header files for Linux 2.6 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6-vserver-k7 - Header files for Linux 2.6 on AMD K7
linux-headers-2.6-xen-686 - Header files for Linux 2.6 on i686
linux-headers-2.6-xen-vserver-686 - Header files for Linux 2.6 on i686
linux-headers-2.6.18-6 - Common header files for Linux 2.6.18
linux-headers-2.6.18-6-486 - Header files for Linux 2.6.18 on x86
linux-headers-2.6.18-6-686 - Header files for Linux 2.6.18 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.18-6-686-bigmem - Header files for Linux 2.6.18 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.18-6-all - All header files for Linux 2.6.18
linux-headers-2.6.18-6-all-i386 - All header files for Linux 2.6.18
linux-headers-2.6.18-6-amd64 - Header files for Linux 2.6.18 on AMD64
linux-headers-2.6.18-6-k7 - Header files for Linux 2.6.18 on AMD K7
linux-headers-2.6.18-6-vserver - Common header files for Linux 2.6.18
linux-headers-2.6.18-6-vserver-686 - Header files for Linux 2.6.18 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.18-6-vserver-k7 - Header files for Linux 2.6.18 on AMD K7
linux-headers-2.6.18-6-xen - Common header files for Linux 2.6.18
linux-headers-2.6.18-6-xen-686 - Header files for Linux 2.6.18 on i686
linux-headers-2.6.18-6-xen-vserver - Common header files for Linux 2.6.18
linux-headers-2.6.18-6-xen-vserver-686 - Header files for Linux 2.6.18 on i686
linux-headers-2.6.24-etchnhalf.1-486 - Header files for Linux 2.6.24 on x86
linux-headers-2.6.24-etchnhalf.1-686 - Header files for Linux 2.6.24 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.24-etchnhalf.1-686-bigmem - Header files for Linux 2.6.24 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.24-etchnhalf.1-all - All header files for Linux 2.6.24
linux-headers-2.6.24-etchnhalf.1-all-i386 - All header files for Linux 2.6.24
linux-headers-2.6.24-etchnhalf.1-amd64 - Header files for Linux 2.6.24 on AMD64
linux-headers-2.6.24-etchnhalf.1-common - Common header files for Linux 2.6.24

Any tips would be appreciated.
Michael

Simon Bridge 12-28-2008 06:57 PM

To get the linux headers ...

sudo apt-get install linux-kernel-headers

what you really want to do is upgrade first, the repository may not keep old packages around for long after the upgrade becomes available.

rickh 12-28-2008 07:12 PM

I don't know the exact solution with the eeepc, but I know Simon Bridge is quite a way off. Wait for better advice.

While you wait, you may want to read through this:

http://wiki.debian.org/DebianEeePC

Looks to me like someone may have switched you over to true Debian. What a blessing that would be.

Simon Bridge 12-28-2008 11:57 PM

Quote:

Originally Posted by rickh (Post 3389864)
I don't know the exact solution with the eeepc, but I know Simon Bridge is quite a way off. Wait for better advice.

Really? (Which bit?) It worked for me?!

My main point was that I didn't need to specify the kernel version for the package, the repo provided a meta-package which would work out what to do.

Unfortunately, I cannot test it now as I got rid of Xandros a while ago.

It's quite tricky to find confirmation of the command for Xandros - most info seems to be for Debian or Ubuntu... eg see:

http://forum.eeeuser.com/viewtopic.php?id=46649&p=14 post #327
sudo apt-get install linux-headers-eeepc
... which is if using ubuntu-intrepid repos.

Perhaps this is outdated now?
Do you have a reference for how far out this advice is?

Quote:

While you wait, you may want to read through this:

http://wiki.debian.org/DebianEeePC

Looks to me like someone may have switched you over to true Debian. What a blessing that would be.
What is it about the previous post suggests that this may have happened? Surely the proliferation of *-eee packages suggests that this machine is still using the Asus repos? [edit: I stand corrected - Ubuntu and Debian repos both use the eee designation in some form as well.]

Still, it would be nice to check this... a missing or incompatible repo would be one of the other things that could produce this error. But so would just getting the package name wrong.

compused 12-29-2008 12:57 AM

HI Simon and Rick
With that long list found in apt-cache, and the above information, I was game enough to try:
apt-get install linux-headers-2.6.24.1*
(ie with the asterisk) and it seemed happy enough...

hopefully I haven't broken it...as am yet to reboot. Thanks very much for both of your efforts

Regards
Michael

Simon Bridge 12-29-2008 06:56 AM

Cool - let us know how it went.

compused 12-29-2008 08:40 AM

Hi...am living up to my nom-de-plume here...to be consistent with `uname -r` I should have specified:
linux-headers-2.6.21.4*
not
linux-headers-2.6.24.1*

Anyway, all is well.

Someone said you only need the linux-headers if recompiling the kernel. There was probably no need to recompile the kernel to install the app in question (freepbx)
Thanks again
Michael

Simon Bridge 01-01-2009 08:42 AM

Some drivers need kernel headers to compile.
Well done anyway.

compused 01-04-2009 07:03 AM

Hi Simon (or anyone!)
I am a bit worried about not having access to the kernel-headers, in case I do need to install drivers in future. I've tried adding new sources to the sources.list.

I also tried to recreate the headers via this method:
Code:

cp /boot/config-2.6.21.4-eeepc /usr/src/.config
cd /usr/src
make oldconfig; make dep


However when I ran:
Code:

make oldconfig; make dep
I got:
Code:

make: *** No rule to make target `oldconfig'.  Stop.
make: *** No rule to make target `dep'.  Stop.


I tried to find a file called 'makefile' but couldn't

Any advice?
Rgds again
Michael

Simon Bridge 01-04-2009 07:46 AM

If you upgrade your kernel, you'll be able to get the headers for that?
Of course, you can always get the whole source code and hand-compile a kernel.

compused 03-06-2009 03:53 AM

solution is included at:
http://whirlpool.net.au/wiki/?tag=freepbx_eeepc
rgds
compused

Simon Bridge 03-06-2009 07:28 PM

There's a bit of a hunt to that solution - so I'll reproduce it here:
Quote:

When typing:
apt-cache search linux-headers*
it shows earlier or later kernel entries in apt-cache, but none in the range of the 2.6.21.whatever

I eventually got the linux headers after googling and adding an additional repository to my /etc/apt/sources.list file, but I was later told by ASUS support that it was not an official ASUS site. So this may be a better link to add to the sources.list file:
deb http://cle.linux.org.tw/EeePC/1.1 v1.1 main
(which is the same as the one listed in the reference http://wiki.eeeuser.com/addingxandrosrepos apart from the fact that it references the deb binary files ie deb http:// rather than the deb source files ie deb-src http:// )

After adding the above to the sources.list file, run:
apt-get update
... however - the report in post #7 seems to indicate that the repos now have the packages.

The page linked refers to the status as of jan this year - but post 7 was dec last year - seems odd. The author, however, did admit to having made a number of mistakes (not documented) so we cannot tell what comes from which.

Hopefully this information will be useful where

apt-get install linux-headers-2.6.24.1*

compused 03-06-2009 10:04 PM

thanks for pasting that Scott

I am not sure why I said 'all was well' in post 7...it might be bec. I had finished compiling freepbx, which I don't think required the linux headers for the particular config. freepbx was compiled in.

apt-get install linux-headers-2.6.24.1* was for the *wrong* kernel

Kind regards
Michael


All times are GMT -5. The time now is 12:01 PM.