![centos 8:debuginfo-install 找不到 kernel-debuginfo 包](https://rvso.com/image/760603/centos%208%EF%BC%9Adebuginfo-install%20%E6%89%BE%E4%B8%8D%E5%88%B0%20kernel-debuginfo%20%E5%8C%85.png)
我有一台已安裝的機器CentOS-8
,附帶的核心是4.18.0。我需要安裝 debiginfo 套件:
% sudo dnf debuginfo-install kernel-4.18.0-193.19.1.el8_2.x86_64
enabling epel-modular-debuginfo repository
enabling epel-debuginfo repository
Last metadata expiration check: 0:22:04 ago on Thu 03 Dec 2020 04:51:14 PM EST.
Could not find debuginfo package for the following installed packages: kernel-4.18.0-193.19.1.el8_2.x86_64
Could not find debugsource package for the following installed packages: kernel-4.18.0-193.19.1.el8_2.x86_64
Dependencies resolved.
Nothing to do.
Complete!
%
雖然yum search
發現:
% yum search kernel-debug
...
kernel-debug.x86_64 : kernel meta-package for the debug kernel
...
%
我認為debuginfo-install
這是使用 debuginfo 安裝軟體包的正確方法。我該怎麼做才能讓它為我工作?
謝謝。
答案1
有兩種方法可以做到這一點。在 CentOS 8 上,
- 可以修改
/etc/yum.repos.d/CentOS-Debuginfo.repo
設定enable=1
然後運行yum install kernel-debuginfo
或者 - 你可以做
yum --enablerepo="base-debuginfo" install kernel-debuginfo
其中任何一個都適用於我的系統。確保磁碟上有足夠的空間。安裝大小為3.1GB。
筆記:
- 您需要檢查
kernel-debuginfo
(ieyum info kernel-debuginfo
) 中使用的核心版本,以確保它與您的核心 (ieuname -r
) 版本相同。 - 如果它們不同,您可能需要尋找
kernel-debuginfo
和的正確版本kernel-debuginfo-common-x86_64
。我使用baseurl
in/etc/yum.repos.d/CentOS-Debuginfo.repo
作為模板來尋找要查找的位置。對 CentOS 8.1 來說這裡。