yum repolist all

yum repolist all

我想用“crash”来看一下内核。

崩溃 /usr/lib/debug/lib/modules//vmlinux /var/crash//vmcore

但是 /usr/lib/debug/lib 是空的,并且看起来该目录(调试库)填充了“debuginfo-install kernel”

我已将 iso 挂载在 /mnt/disc 上,并且 yum 可以识别该 repo。

yum repolist all

已加载插件:langpacks、product-id、search-disabled-repos、subscription-manager 此系统未在授权服务器上注册。您可以使用 subscription-manager 进行注册。repo id repo 名称 状态 InstallMedia Red Hat Enterprise Linux 7.7 enabled:5,229 repolist:5,229

但是,当我尝试以下操作时,似乎想要/需要订阅管理器注册:

debuginfo-安装内核

已加载插件:langpacks、product-id、subscription-manager 此系统未在授权服务器上注册。您可以使用 subscription-manager 进行注册。无法找到主软件包的调试信息:kernel-3.10.0-1062.el7.x86_64 没有可安装的调试信息软件包

或者

debuginfo-install kernel --enablerepo=InstallMedia

已加载插件:langpacks、product-id、subscription-manager 此系统未在授权服务器上注册。您可以使用 subscription-manager 进行注册。无法找到主软件包的调试信息:kernel-3.10.0-1062.el7.x86_64 没有可安装的调试信息软件包

如何从 iso repo 安装内核 debuginfo 包?

答案1

如果您有 iso 映像或 DVD,请尝试以下步骤在本地系统中安装并安装软件包。

mkdir -p /mnt/disc

安装-o循环RHEL7.1.iso /mnt/disc

If you use DVD media , you can mount like below.

# mkdir -p  /mnt/disc
# mount /dev/sr0  /mnt/disc

Copy the media.repo file from the root of the mounted directory to /etc/yum.repos.d/ and set the permissions to 0644 or another similar permissions set:


# cp /mnt/disc/media.repo /etc/yum.repos.d/rhel7dvd.repo
# chmod 644 /etc/yum.repos.d/rhel7dvd.repo

Edit the new repo file, changing the gpgcheck=0 setting to 1 and adding the following 3 lines


vi /etc/yum.repos.d/rhel7dvd.repo
enabled=1
baseurl=file:///mnt/disc/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

In the end, the new repo file could look like the following


[InstallMedia]
name=DVD for Red Hat Enterprise Linux 7.1 Server
mediaid=1359576196.686790
metadata_expire=-1
gpgcheck=1
cost=500
enabled=1
baseurl=file:///mnt/disc/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Clear the cache and check whether you can get the packages list from the DVD repo

# yum clean all
# yum repolist enabled

It should look like the following if no other repository is enabled.
To avoid any corruption its recommend to disable any non-redhat repositories.

yum repolist 已启用

已加载插件:product-id、search-disabled-repos、subscription-manager 此系统未注册到 Red Hat Subscription Management。您可以使用 subscription-manager 进行注册。repo id repo 名称
InstallMedia Red Hat Enterprise Linux 7.7 repolist:5,229

If no errors are returned, the following can be used to update:

# yum update

相关内容