1

I installed the Linux header file for my kernel using command:

sudo apt-get install linux-headers-`uname -r`

In the folder

/usr/src/linux-headers-2.6.32-21-generic

all the files have broken links.

Example: The file linux-headers-2.6.32-21/crypto has broken link points to ../linux-headers-2.6.32-21/crypto.

Output of

ls -l /usr/src/linux-headers-2.6.32-21-generic :

drwxr-xr-x 3 root root   4096 2013-03-25 18:39 arch
lrwxrwxrwx 1 root root     32 2013-03-25 18:39 block -> ../linux-headers-2.6.32-    21/block
lrwxrwxrwx 1 root root     33 2013-03-25 18:39 crypto -> ../linux-headers-2.6.32-21/crypto
lrwxrwxrwx 1 root root     40 2013-03-25 18:39 Documentation -> ../linux-headers-2.6.32-21/Documentation
lrwxrwxrwx 1 root root     34 2013-03-25 18:39 drivers -> ../linux-headers-2.6.32-21/drivers
lrwxrwxrwx 1 root root     35 2013-03-25 18:39 firmware -> ../linux-headers-2.6.32-21/firmware
lrwxrwxrwx 1 root root     29 2013-03-25 18:39 fs -> ../linux-headers-2.6.32-21/fs
drwxr-xr-x 5 root root   4096 2013-03-25 18:39 include
lrwxrwxrwx 1 root root     31 2013-03-25 18:39 init -> ../linux-headers-2.6.32-21/init
lrwxrwxrwx 1 root root     30 2013-03-25 18:39 ipc -> ../linux-headers-2.6.32-21/ipc
lrwxrwxrwx 1 root root     33 2013-03-25 18:39 Kbuild -> ../linux-headers-2.6.32-21/Kbuild
drwxr-xr-x 2 root root   4096 2013-03-25 18:39 kernel
lrwxrwxrwx 1 root root     30 2013-03-25 18:39 lib -> ../linux-headers-2.6.32-21/lib
lrwxrwxrwx 1 root root     35 2013-03-25 18:39 Makefile -> ../linux-headers-2.6.32-21/Makefile
lrwxrwxrwx 1 root root     29 2013-03-25 18:39 mm -> ../linux-headers-2.6.32-21/mm
-rw-r--r-- 1 root root 640617 2010-04-16 18:37 Module.symvers
lrwxrwxrwx 1 root root     30 2013-03-25 18:39 net -> ../linux-headers-2.6.32-21/net
lrwxrwxrwx 1 root root     34 2013-03-25 18:39 samples -> ../linux-headers-2.6.32-21/samples
drwxr-xr-x 7 root root   4096 2013-03-25 18:39 scripts
lrwxrwxrwx 1 root root     35 2013-03-25 18:39 security -> ../linux-headers-2.6.32-21/security
lrwxrwxrwx 1 root root     32 2013-03-25 18:39 sound -> ../linux-headers-2.6.32-21/sound
lrwxrwxrwx 1 root root     26 2013-03-25 18:39 source -> /build/buildd/linux-2.6.32
lrwxrwxrwx 1 root root     32 2013-03-25 18:39 tools -> ../linux-headers-2.6.32-21/tools
lrwxrwxrwx 1 root root     33 2013-03-25 18:39 ubuntu -> ../linux-headers-2.6.32-21/ubuntu
lrwxrwxrwx 1 root root     30 2013-03-25 18:39 usr -> ../linux-headers-2.6.32-21/usr
lrwxrwxrwx 1 root root     31 2013-03-25 18:39 virt -> ../linux-headers-2.6.32-21/virt

Output of:

uname -r

2.6.32-21-generic

How should i fix this? (I want the headers files without broken links).

4
  • Is every one of the symbolic links broken, or just some/most of them? Mar 25, 2013 at 13:26
  • all the symbolic links Mar 25, 2013 at 14:28
  • Does a /usr/src/linux-headers-2.6.32-21 folder exist? Mar 25, 2013 at 15:13
  • yes. Thats what i am talking about. Inside that folder, everything is broken. Mar 25, 2013 at 15:20

1 Answer 1

1

Those missing files in the /usr/src/linux-headers-2.6.32-21 directory are provided by the package linux-headers-2.6.32-21 Install linux-headers-2.6.32-21. To get them, try installing that package.

If you want to install it from the command line, run:

sudo apt-get update && sudo apt-get install linux-headers-2.6.32-21

(The apt-get update part will help to make sure the system installs the package based in correct and consistent information about what packages are available from where and in what versions.)

3
  • I ran ur command. Still broken links. Mar 26, 2013 at 5:01
  • @Karthiprime Please add the output of ls -l /usr/src and apt-cache policy ^linux-headers-2.6.32-21 to your question. Mar 26, 2013 at 11:09
  • I dont know how, its working fine now (Got the working symbolic links). Thanks for the time. Mar 26, 2013 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .