当前位置:网站首页>Red hat install kernel header file
Red hat install kernel header file
2022-07-07 05:53:00 【Xiao Liai studies】
List of articles
Preface
Red Hat edition :
One 、The Linux kernel RPM
1.1 rpm
rpm - RPM Package Manager
rpm Is a powerful package manager , Can be used for build, install, query, verify, update, and erase Single software package . A package consists of file archives and is used to install and delete archived files metadata form . metadata Include helper scripts、 file attributes And descriptive information about the package .
RPM package It contains other files and their metadata ( Information about the documents required by the system ) The file of .
say concretely ,RPM By cpio The archived documents consist of :
cpio The archive contains :
(1)Files
(2)RPM header (package metadata)
rpm The package manager uses this metadata To determine the dependency 、 Location of installation files and other information .
Types of RPM packages: There are two types of RPM package .
Two types of shared files , Formats and tools , But there are different contents and services for different purposes :
Binary RPM(binary packages): Contains binaries built from source code and patches .
Source RPM(SRPM,source packages):SRPM Contains source code and SPEC file , This file describes how to build the source code into binary RPM. Optionally , Patches to the source code are also included .
QUERY OPTIONS
The general form of an rpm query command is
rpm {
-q|--query} [select-options] [query-options]
-a, --all
Query all installed packages.
1.2 Install kernel header file
(1)
Compile the simplest Hello world modular , Compile failed :

Red Hat Header file in /usr/src/kernels Under the table of contents ,/usr/src/kernels There is no kernel header under the directory :
Kernel header the kernel header file is composed of kernel-devel Package provision , install kernel-devel software package :
Show :
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Out-of-service yum…
(2)
Download the kernel header on this website :
https://vault.centos.org/7.3.1611/os/x86_64/Packages/
rpm -ivh *.rpm --nodeps --force
-i, --info
Display package information, including name, version, and description. This uses the --queryformat if one was specified.
// Show package information , Include the name 、 Version and description .
-v Print verbose information - normally routine progress messages will be displayed.
// Print details - General progress messages are usually displayed .
-h, --hash
Print 50 hash marks as the package archive is unpacked. Use with -v|--verbose for a nicer display.
// Print when decompressing the package for archiving 50 hash marks. And -v|--verbose Use together to get better display effect .
--nodeps
Don't do a dependency check before installing or upgrading a package.
// Do not check dependencies before installing or upgrading packages .
--force
Same as using --replacepkgs, --replacefiles, and --oldpackage.
--replacefiles
Install the packages even if they replace files from other, already installed, packages.
// Install these packages , Even if they replace files in other installed packages .
--replacepkgs
Install the packages even if some of them are already installed on this system.
// Even if some of them are installed on this system , Also install these packages .
--oldpackage
Allow an upgrade to replace a newer package with an older one.
// Allow upgrades to replace newer packages with older packages .

In this way, the kernel head installation is completed :
Because I installed three packages , stay /boot/ The kernel image of this kernel version will also be generated under the directory ...
(3)
kernel: Linux Kernel packages , Inclusion sheet 、 Cores of multicore and multiprocessor systems , Any Linux The core of operating system , A single processor system only needs to install the kernel package . The kernel handles the basic functions of the operating system : Memory allocation 、 Process assignment 、 Equipment input and output .
kernel-devel: This package provides enough to build modules based on kernel packages kernel headers and makefile file ( It includes kernel-headers).
kernel-headers: Include designation Linux The interface between the kernel and user space libraries and programs C The header file . Header files define the structures and constants needed to build most standard programs .
kernel-debug : Contains many for the kernel debug Enabling options for diagnostics and debugging , It should only be installed if we need to try to collect additional kernel error information . It is at the expense of performance .
kernel-tools: Contains for manipulation Linux Kernel and documentation supporting tools .
(4)
Just write the kernel module installation kernel-headers-3.10.0-514.el7.x86_64 Can :
rpm -ivh kernel-headers-3.10.0-514.el7.x86_64.rpm --nodeps --force
install kernel-devel After the package , You can go to /usr/src/kernels/ Find all the kernel header files , You can write kernel modules .
(5)
Can be yum Source transposition centos Source , So you can go directly through yum To install the kernel header file .
yum install kernel-devel
yum install kernel-headers
summary
For the first time to use Red Hat( Of course, it's often used centos) , That's all Red Hat7.3 Steps to install the kernel header file .
Reference material
边栏推荐
- 软件测试面试技巧
- 原生小程序 之 input切換 text與password類型
- 集群、分布式、微服務的區別和介紹
- 《HarmonyOS实战—入门到开发,浅析原子化服务》
- 2pc of distributed transaction solution
- Codeforces Round #416 (Div. 2) D. Vladik and Favorite Game
- I didn't know it until I graduated -- the principle of HowNet duplication check and examples of weight reduction
- Educational Codeforces Round 22 B. The Golden Age
- Classic questions about data storage
- Five core elements of architecture design
猜你喜欢

Opensergo is about to release v1alpha1, which will enrich the service governance capabilities of the full link heterogeneous architecture
![Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]](/img/9c/1f031400f0e201df47bd51547ff73f.png)
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]

Add salt and pepper noise or Gaussian noise to the picture

Digital IC interview summary (interview experience sharing of large manufacturers)

Simple case of SSM framework

消息队列:如何确保消息不会丢失

sql查询:将下一行减去上一行,并做相应的计算

消息队列:消息积压如何处理?
![[云原生]微服务架构是什么?](/img/84/a0ec68646083f3539aa39ad9d98749.png)
[云原生]微服务架构是什么?
Interview questions and salary and welfare of Shanghai byte
随机推荐
Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
How to get free traffic in pinduoduo new store and what links need to be optimized in order to effectively improve the free traffic in the store
Three level menu data implementation, nested three-level menu data
线性回归
Modes of optical fiber - single mode and multimode
Flinksql read / write PgSQL
Input of native applet switches between text and password types
Introduction to distributed transactions
分布式事务介绍
async / await
Codeforces Round #416 (Div. 2) D. Vladik and Favorite Game
Message queuing: how to ensure that messages are not lost
Reading notes of Clickhouse principle analysis and Application Practice (6)
Paper reading [semantic tag enlarged xlnv model for video captioning]
How much do you know about clothing ERP?
[paper reading] semi supervised left atrium segmentation with mutual consistency training
《2022中国低/无代码市场研究及选型评估报告》发布
产业金融3.0:“疏通血管”的金融科技
分布式全局ID生成方案
PTA 天梯赛练习题集 L2-004 搜索树判断