Linux 頭文件資料夾中的連結已損壞

Linux 頭文件資料夾中的連結已損壞

我使用以下命令為我的核心安裝了 Linux 頭檔:

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

在資料夾中

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

全部文件的連結已損壞。

範例:檔案 linux-headers-2.6.32-21/crypto 指向 ../linux-headers-2.6.32-21/crypto 的連結點已損壞。

輸出

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

輸出:

uname -r

2.6.32-21-generic

我該如何解決這個問題? (我想要沒有損壞連結的頭檔)。

答案1

目錄中遺失的檔案/usr/src/linux-headers-2.6.32-21假如按包裝linux-headers-2.6.32-21安裝 linux-headers-2.6.32-21。要取得它們,請嘗試安裝該軟體包。

如果您想從命令列安裝它,請運行:

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

(該apt-get update部分將有助於確保系統根據有關​​哪些軟體包在何處以及哪些版本可用的正確且一致的資訊來安裝軟體包。)

相關內容