閱讀362 返回首頁    go 技術社區[雲棲]


CentOS6.2編譯gcc失敗,kernel-headers錯誤

準備轉移到阿裏雲服務器,用的CentOS6.2 x64,虛擬機上用的 6.3版本,測試重裝了好幾次都沒問題了,結果在雲服務器上剛開始就出問題了。。。

yum 安裝的時候居然出錯了,靠。。。網上 google 了下,發現也有同學用阿裏雲的服務器出現這個問題,有了個解決方案,順便 copy 過來 整理了下!

也不知道是不是阿裏雲服務器的係統原版有問題啊。。

錯誤描述:

Error: Package: glibc-headers-2.12-1.80.el6_3.4.x86_64 (updates)
Requires: kernel-headers >= 2.2.1
Error: Package: glibc-headers-2.12-1.80.el6_3.4.x86_64 (updates)
Requires: kernel-headers
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
kernel-2.6.32-220.13.1.el6.x86_64 has missing requires of kernel-firmware >= ('0', '2.6.32', '220.13.1.el6')

步驟:

1. 查看自己服務器的 kernel版本號

rpm -q kernel

2. 下載對應的 kernel-headers 版本

地址:

https://rpm.pbone.net/index.php3/stat/4/idpl/18032865/dir/scientific_linux_6/com

wget ftp://ftp.ntua.gr/pub/linux/scientificlinux/6.0/x86_64/updates/security/kernel-headers-2.6.32-220.13.1.el6.x86_64.rpm


3. 安裝 rpm 包

rpm -Uvh kernel-headers-2.6.32-220.13.1.el6.x86_64.rpm

4. 完成!!!可以繼續 yum 下去了。。。





最後更新:2017-04-03 12:55:12

  上一篇:go 2012藍橋杯【初賽試題】古堡算式
  下一篇:go imagick-3.1.0RC2 安裝錯誤