CentOS下yum安裝缺少kernel-headers的解決方案

來源:互聯網
上載者:User

   centos出現Missing Dependency :kernel-header 的解決方案,在此記下

  錯誤資訊如下:

  代碼如下:

  glibc-headers-2.5-81.el5_8.2.x86_64 from updates has depsolving problems

  --> Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)

  glibc-headers-2.5-81.el5_8.2.x86_64 from updates has depsolving problems

  --> Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)

  Error: Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)

  Error: Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.el5_8.2.x86_64 (updates)

  You could try using --skip-broken to work around the problem

  You could try running: package-cleanup --problems

  package-cleanup --dupes

  rpm -Va --nofiles --nodigest

  安裝kernel-headers即可解決問題,如下

  代碼如下:

  wget http://vault.centos.org/5.7/os/x86_64/CentOS/kernel-headers-2.6.18-274.el5.x86_64.rpm

  rpm -ivh kernel-headers-2.6.18-274.el5.x86_64.rpm

  同理,經常會遇到linux下安裝軟體時提示少檔案,如何知道所缺少的檔案屬於哪個包?用什麼命令查看?

  例如:/lib/ld-linux.so.2: bad ELF interpreter: 沒有那個檔案或目錄

  如何判斷知道ld-linux.so.2檔案屬於哪個包,知道後才能用yum安裝,使用如下命令:

  代碼如下:

  yum provides "*/ld-linux.so.2"

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.