Where is the RHEL7 kernel source code installed?
8,769
Source packages are not added to the rpm database, so they will not show on query.
Probable location is ~/rpmbuild/{SOURCES,SPECS} with SOURCES containing the package sources and distribution patches while the SPECS subdirectory containing the .spec file being used to build the package (see rpmbuild (8) man page for details).
If you can't find the sources there, than reinstall with the -vv option to check the location if it's overwritten:
$ 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: ==========
Related videos on Youtube
Author by
Nan Xiao
Updated on September 18, 2022Comments
-
Nan Xiao over 1 year
I install the
Linux
kernel source code 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
The installation process seems success, but using
rpm -ql kernel-3.10.0-229.el7.src
command can't find where the source code is installed:[root@localhost ~]# rpm -ql kernel-3.10.0-229.el7.src package kernel-3.10.0-229.el7.src is not installed
Where is the
RHEL7
kernel source code installed?Update:
rpm -qa | grep kernel
command ouput:[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
-
steve almost 9 yearsAdd output of "rpm -qa|grep kernel", just to show what is actually installed ?
-
-
Aaghaz almost 9 yearstry rpm -ql kernel-3.10.0-229.el7.x86_64
-
Aaghaz almost 9 yearskernel-devel is actually not full source code, but contains enough to compile modules.
-
nkms almost 9 yearsThere's actually only one warning that is repeated for every file that is created. The rpm says that the files must belong to user "builder" (the account used by redhat for developing). Since this user does not exists in the current system the files will be created as the default user "root" or if you run the command as normal user, the user running the command and display a warning.