- Пакет: linux-headers-generic (5.15.0.1007.7 и другие) [ports]
- Original Maintainer (usually from Debian):
- Подобные пакеты:
- Generic Linux kernel headers
- Другие пакеты, относящиеся к linux-headers-generic
- Загрузка linux-headers-generic
- How do I install kernel header files?
- Case of Obsolete kernel package
- Пакет: linux-headers-generic (5.4.0.153.150 и другие) [security]
- Original Maintainer (usually from Debian):
- Подобные пакеты:
- Generic Linux kernel headers
- Другие пакеты, относящиеся к linux-headers-generic
- Загрузка linux-headers-generic
- How to install kernel headers on Debian
- Installing kernel headers on Debian 11:
- What is the Linux kernel?
- What are Linux Kernel Headers?
- Conclusion:
- About the author
- David Adams
Пакет: linux-headers-generic (5.15.0.1007.7 и другие) [ports]
Please consider filing a bug or asking a question via Launchpad before contacting the maintainer directly.
Original Maintainer (usually from Debian):
It should generally not be necessary for users to contact the original maintainer.
Подобные пакеты:
- linux-headers-generic-hwe-20.04-edge
- linux-headers-iot
- linux-headers-generic-hwe-22.04
- linux-headers-generic-hwe-22.04-edge
- linux-headers-generic-lpae
- linux-headers-generic-lpae-hwe-20.04
- linux-headers-generic-64k-hwe-20.04
- linux-headers-generic-64k-hwe-20.04-edge
- linux-headers-generic-lpae-hwe-20.04-edge
- linux-headers-generic-64k
- linux-headers-generic-64k-hwe-22.04
Generic Linux kernel headers
Другие пакеты, относящиеся к linux-headers-generic
- зависимости
- рекомендации
- предложения
- enhances
- dep: linux-headers-5.15.0-1007-generic [riscv64] Linux kernel headers for version 5.15.0 on RISC-V SMP
- dep: linux-headers-5.15.0-25-generic [не amd64, riscv64] Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
- dep: linux-headers-5.15.0-76-generic [amd64] Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
Загрузка linux-headers-generic
Архитектура | Версия | Размер пакета | В установленном виде | Файлы |
---|---|---|---|---|
amd64 | 5.15.0.76.74 | 2,3 Кб | 20,0 Кб | [список файлов] |
arm64 | 5.15.0.25.27 | 2,4 Кб | 19,0 Кб | [список файлов] |
armhf | 5.15.0.25.27 | 2,4 Кб | 19,0 Кб | [список файлов] |
ppc64el | 5.15.0.25.27 | 2,4 Кб | 19,0 Кб | [список файлов] |
riscv64 | 5.15.0.1007.7 | 2,3 Кб | 10,0 Кб | [список файлов] |
s390x | 5.15.0.25.27 | 2,4 Кб | 19,0 Кб | [список файлов] |
This page is also available in the following languages:
Авторские права © 2023 Canonical Ltd.; См. условия лицензии. Ubuntu это торговый знак компании Canonical Ltd. Об этом сайте.
How do I install kernel header files?
You should be able to install the kernel header files for the currently running kernel by running the following in a terminal:
sudo apt-get install linux-headers-$(uname -r)
In general, the kernel header packages are named linux-header-* where «*» indicates the version & variant (generic, server, etc.).
hey thanks but could you tell me what does generic, server, etc means i want to write (kernel driver)
This won’t install the headers for future updates automatically and you’ll have to re-run this command every time. Therefore, it’s recommended to install the metapackage instead, as described in another answer.
sudo apt-get install linux-headers-generic
if you are on a Desktop installation. The apt-get will solve the dependencies and install the correct version of kernel headers.
In Debian Wheezy I get the error message «Package linux-headers-generic is not available, but is referred to by another package. [. ] E: Package ‘linux-headers-generic’ has no installation candidate»
@IQAndreas the linux-headers-generic package is ubuntu specific. On Debian you should use sudo apt-get install linux-headers-$(uname -r)
I have linux-headers-generic installed on 18.04 but still don’t have the headers for the newest and current kernel version. Maybe it’s just a bug with this version, I’ve compiled kernel modules in earlier versions so I must’ve had the correct headers back then.
Case of Obsolete kernel package
This should cover another problem when: the currently running kernel is obsolete, meaning it’s not in the repository anymore neither its headers. So the best thing to do is to update the kernel to last version in the repository.
linux-generic is a meta package to keep current version of the kernel & its headers:
sudo apt-get update sudo apt-get install linux-generic
Note: Depending on your Ubuntu edition, See if you need linux-lowlatency (Ubuntu Studio), linux-signed-generic or linux-virtual .
Пакет: linux-headers-generic (5.4.0.153.150 и другие) [security]
Please consider filing a bug or asking a question via Launchpad before contacting the maintainer directly.
Original Maintainer (usually from Debian):
It should generally not be necessary for users to contact the original maintainer.
Подобные пакеты:
- linux-headers-generic-hwe-20.04-edge
- linux-headers-iot
- linux-headers-generic-hwe-22.04
- linux-headers-generic-hwe-22.04-edge
- linux-headers-generic-lpae
- linux-headers-generic-lpae-hwe-20.04
- linux-headers-generic-64k-hwe-20.04
- linux-headers-generic-64k-hwe-20.04-edge
- linux-headers-generic-lpae-hwe-20.04-edge
- linux-headers-generic-64k
- linux-headers-generic-64k-hwe-22.04
Generic Linux kernel headers
Другие пакеты, относящиеся к linux-headers-generic
- зависимости
- рекомендации
- предложения
- enhances
- dep: linux-headers-5.4.0-153-generic [amd64] Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
- dep: linux-headers-5.4.0-24-generic [riscv64] Linux kernel headers for version 5.4.0 on RISC-V SMP
- dep: linux-headers-5.4.0-26-generic [не amd64, riscv64] Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
Загрузка linux-headers-generic
Архитектура | Версия | Размер пакета | В установленном виде | Файлы |
---|---|---|---|---|
amd64 | 5.4.0.153.150 | 2,4 Кб | 19,0 Кб | [список файлов] |
arm64 | 5.4.0.26.32 | 2,6 Кб | 17,0 Кб | [список файлов] |
armhf | 5.4.0.26.32 | 2,6 Кб | 17,0 Кб | [список файлов] |
ppc64el | 5.4.0.26.32 | 2,6 Кб | 17,0 Кб | [список файлов] |
riscv64 | 5.4.0.24.30 | 2,1 Кб | 9,0 Кб | [список файлов] |
s390x | 5.4.0.26.32 | 2,6 Кб | 17,0 Кб | [список файлов] |
This page is also available in the following languages:
Авторские права © 2023 Canonical Ltd.; См. условия лицензии. Ubuntu это торговый знак компании Canonical Ltd. Об этом сайте.
How to install kernel headers on Debian
All instructions in this tutorial are also useful for other Debian-based Linux distributions such as Ubuntu.
Installing kernel headers on Debian 11:
First, update the information on your software using apt, as shown in the example below.
Check for available Linux kernel headers by running the following command.
For a different simple way to list available headers, run the command below.
To install the Linux kernel headers, run the command shown in the screenshot below.
Using Debian 11 x64 or using the second method to find the header, you can also run the following command.
In my case, the headers were installed in the previous example, so the output says it’s already properly installed.
What is the Linux kernel?
Some experts say the kernel is the core component of an Operating System; others disagree and say the kernel is not part of the OS but a vital component needed by any OS. The function of the kernel is to manage the device resources for them to interact with the operating system and applications. We can think about the kernel as a translator allowing communication between the hardware and the software. In order to manage resources properly, the kernel has full privileges. In some cases, the installed kernel may lack the proper code to allow the hardware and software interaction; that’s when we need to install kernel headers.
What are Linux Kernel Headers?
Linux kernel headers are components usually used to compile drivers and loadable modules adding support to the kernel. For this purpose, kernel headers include C headers with functions and structures needed to compile modules. Thanks to kernel headers, modules or drivers can interact with the kernel. It is important to clarify the kernel headers are part of the kernel, despite being distributed separately.
Dealing with kernel headers is easier than dealing with whole kernel sources. If you are looking for drivers for a device, you’ll use kernel headers, while to rebuild the whole kernel, you will need whole kernel sources. By default, some Linux distributions, including Debian, include the kernel headers to be used if needed (this tutorial assumes you discarded or removed the headers). If all your hardware works properly, you probably won’t need to deal with kernel headers.
Conclusion:
As you can see, installing Linux kernel headers on Debian or Ubuntu is pretty easy. Any Linux-level user should know the function of kernel headers and how to install them. Users must pay attention to the kernel headers they download that are compatible with their system, not only the architecture but also the version.
Thank you for reading this tutorial explaining how to install kernel headers on Debian. Keep following Linux Hint for additional Linux tips and tutorials.
About the author
David Adams
David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.