[問題] 找不到kernel-2.6.31.20的下載

看板Linux作者時間15年前 (2010/06/11 03:31), 編輯推噓3(305)
留言8則, 2人參與, 最新討論串1/3 (看更多)
環境:ubuntu9.10、kernel2.6.31.20 目的:編譯一個簡單的module然後掛上去 最近剛開始學driver, 因為我安裝ubuntu之後/lib/modules/2.6.31-20-generic下沒有build這個檔案, 所以我直接去kernel.org下載kernel source linux-2.6.31-2來build我的module 因為我在kernel.org上只有看到linux-2.6.31-2沒看到linux-2.6.31.20, 就以為兩個是一樣的意思, 結果遇到"insmod: error inserting 'hello.ko': -1 Invalid module format", dmesg出現"hello: no symbol version for module_layout" google了一下好像是版本下錯的樣子, 但是我怎麼也google不到linux-2.6.31-20這個版本的kernel source code 可以請問一下這到底是什麼情況嗎?謝謝! ※ 編輯: kafy 來自: 118.168.71.241 (06/11 03:33) ※ 編輯: kafy 來自: 118.168.71.241 (06/11 03:35)

06/11 03:43, , 1F
另外為啥ubuntu的kernel version跟kernel.org的version數字
06/11 03:43, 1F

06/11 03:44, , 2F
差這麼多呀?
06/11 03:44, 2F

06/11 07:18, , 3F
sudo apt-get install linux-source-`uname -r`
06/11 07:18, 3F

06/11 07:18, , 4F
這樣有試過嗎?
06/11 07:18, 4F

06/11 08:33, , 5F
dpkg -l查不出來,apt-get也沒用(難道這是cannonical的財產?)
06/11 08:33, 5F

06/11 09:22, , 6F
dpkg -l是看自己有哪些套件吧....?
06/11 09:22, 6F

06/11 09:22, , 7F
apt-cache search linux-source看看
06/11 09:22, 7F

06/11 09:26, , 8F
抱歉記錯,是-L才是
06/11 09:26, 8F
文章代碼(AID): #1C4Js1NX (Linux)
文章代碼(AID): #1C4Js1NX (Linux)