Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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).

share|improve this question
    
I edited it. Thanks. –  Karthi prime Mar 25 '13 at 13:24
    
Is every one of the symbolic links broken, or just some/most of them? –  Eliah Kagan Mar 25 '13 at 13:26
    
all the symbolic links –  Karthi prime Mar 25 '13 at 14:28
    
Does a /usr/src/linux-headers-2.6.32-21 folder exist? –  Eliah Kagan Mar 25 '13 at 15:13
    
yes. Thats what i am talking about. Inside that folder, everything is broken. –  Karthi prime Mar 25 '13 at 15:20
add comment

1 Answer

up vote 1 down vote accepted

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.)

share|improve this answer
    
I ran ur command. Still broken links. –  Karthi prime Mar 26 '13 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. –  Eliah Kagan Mar 26 '13 at 11:09
    
I dont know how, its working fine now (Got the working symbolic links). Thanks for the time. –  Karthi prime Mar 26 '13 at 14:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.