我安装Linux
内核源码RPM:
[root@localhost ~]# rpm -ivh kernel-3.10.0-229.el7.src.rpm
warning: kernel-3.10.0-229.el7.src.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Updating / installing...
1:kernel-3.10.0-229.el7 ################################# [100%]
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
warning: user builder does not exist - using root
warning: group builder does not exist - using root
安装过程看似成功,但是使用rpm -ql kernel-3.10.0-229.el7.src
命令找不到源代码安装在哪里:
[root@localhost ~]# rpm -ql kernel-3.10.0-229.el7.src
package kernel-3.10.0-229.el7.src is not installed
内核源代码安装在哪里RHEL7
?
更新:rpm -qa | grep kernel
命令输出:
[root@localhost ~]# rpm -qa | grep kernel
kernel-headers-3.10.0-229.el7.x86_64
kernel-devel-3.10.0-229.el7.x86_64
kernel-3.10.0-229.el7.x86_64
kernel-tools-libs-3.10.0-229.el7.x86_64
abrt-addon-kerneloops-2.1.11-19.el7.x86_64
kernel-tools-3.10.0-229.el7.x86_64
答案1
源包不会添加到 rpm 数据库中,因此它们不会在查询中显示。
可能的位置是 ~/rpmbuild/{SOURCES,SPECS},其中 SOURCES 包含软件包源和分发补丁,而 SPECS 子目录包含用于构建软件包的 .spec 文件(有关详细信息,请参阅 rpmbuild (8) 手册页)。
如果您在那里找不到源,请使用 -vv 选项重新安装以检查该位置是否被覆盖:
$ rpm -ivvh kernel-3.10.0-229.7.2.el7.src.rpm
--- snip ---
Updating / installing...
1:kernel-3.10.0-229.7.2.el7 ################################# [100%]
D: ========== Directories not explicitly included in package:
D: 0 /home/user/rpmbuild/SOURCES/
D: 1 /home/user/rpmbuild/SPECS/
D: ==========
答案2
它应该在/usr/src/内核。
如果你没有找到它,你可以尝试
rpm -qa| grep -w 内核开发
rpm -ql 内核开发-xxxxx
这将为您提供内核 rpm 安装的文件的位置。
顺便说一下,内核源代码应该使用 kernel-devel 包安装,而不是 kernel-xxxx