Linux mint linux headers

Linux Mint Forums

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Kernel header files??

Post by Tatbiiqaji » Tue May 31, 2016 2:27 pm

Hello. I’ve got some experience with Slackware-based OSes but I’m not familiar with Linux Mint. My version is 17 Qiana.

My problem is: I need the kernel header files to be installed on the system. First I need the package name in which the kernel header files are usually placed under Mint, not under Ubuntu.

My impression is that my kernel is in the package linux-kernel-generic, the version of which is 3.13.0-24. I’ve got kernel header files from Ubuntu Trusty Tahr on my system in packages named linux-headers-generic with the versions 3.13.0.24.28 and 3.13.0.86.92 (both from trusty).

When I enter into the system

sudo aptitude install linux-headers-generic

it tells me that it would uninstall linux-kernel-generic. Wouldn’t this erase the kernel or parts of it? This would make no sense to me. Of course, I answered with «no» then.

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Re: Kernel header files??

Post by JeremyB » Tue May 31, 2016 6:17 pm

sudo apt-get install linux-headers-$(uname -r)
dpkg -l | grep linux-headers-$(uname -r)

Image

Wireless Script

austin.texas Level 20
Posts: 12003 Joined: Tue Nov 17, 2009 3:57 pm Location: at /home

Re: Kernel header files??

Post by austin.texas » Tue May 31, 2016 6:25 pm

Tatbiiqaji wrote: it tells me that it would uninstall linux-kernel-generic. Wouldn’t this erase the kernel or parts of it?

Читайте также:  Asus eeebox x205ta linux

No. linux-kernel-generic is a meta-package which currently installs the 3.19.0-32 kernel. It is not a kernel.
Uninstalling that meta-package has no effect on your system.

dan@skynet1 ~ $ aptitude show linux-kernel-generic Package: linux-kernel-generic State: installed Automatically installed: no Version: 3.19.0-32 Priority: optional Section: kernel Maintainer: Clement Lefebvre Architecture: all Uncompressed Size: 25.6 k Depends: linux-headers-3.19.0-32, linux-headers-3.19.0-32-generic, linux-image-3.19.0-32-generic, linux-image-extra-3.19.0-32-generic, linux-firmware Conflicts: linux-generic, linux-generic, linux-headers-generic, linux-headers-generic, linux-image-generic, linux-image-generic Breaks: linux-generic, linux-generic, linux-headers-generic, linux-headers-generic, linux-image-generic, linux-image-generic Provides: linux-headers, linux-image Description: The Linux kernel. This is a meta-package which depends on the latest recommended kernel packages.

linux-kernel-generic is not the easiest (or preferred) way to install a new kernel in Mint. Open the Update Manager > View menu > Linux Kernels and chose the one you want.

Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

Источник

linux-headers-5.15.0-25-generic on Linux Mint 21 «Vanessa»

Please follow the steps below to install linux-headers-5.15.0-25-generic package:

2. Uninstall / Remove linux-headers-5.15.0-25-generic package

Please follow the guidelines below to uninstall linux-headers-5.15.0-25-generic package:

3. Details of linux-headers-5.15.0-25-generic package

Package: linux-headers-5.15.0-25-generic
Architecture: amd64
Version: 5.15.0-25.25
Priority: optional
Section: devel
Source: linux
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 23663
Provides: linux-headers, linux-headers-3.0
Depends: linux-headers-5.15.0-25, libc6 (>= 2.34), libelf1 (>= 0.142), libssl3 (>= 3.0.0~~alpha1), zlib1g (>= 1:1.2.3.3)
Filename: pool/main/l/linux/linux-headers-5.15.0-25-generic_5.15.0-25.25_amd64.deb
Size: 2801722
MD5sum: 46bc01f1dd72210ab149559d22da3c23
SHA1: 30a02e1dd5be020d79f10e974e8f25b9d5089c38
SHA256: 98fc74c3e7aac1532fea035df063786a19a932f87e970ed6df355c31fbcf7286
SHA512: 0593942cb6910c25842f34eca4e8992162ed66fda131df11708f2639b21f8aaef34c43ff84b95a3cebadd87687e3136ec0eaba9f46d94143e86220f04b8e5ef7
Description: Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
Description-md5: 78e86b35319ea8350191053f576beeab
Task: ubuntustudio-video

4. References on Linux Mint 21 «Vanessa»

Источник

linux-headers-5.15.0-43-generic on Linux Mint 20.3 «Una»

Please follow the steps below to install linux-headers-5.15.0-43-generic package:

2. Uninstall / Remove linux-headers-5.15.0-43-generic package

This guide let you learn how to uninstall linux-headers-5.15.0-43-generic package:

3. Details of linux-headers-5.15.0-43-generic package

Package: linux-headers-5.15.0-43-generic
Architecture: amd64
Version: 5.15.0-43.46~20.04.1
Priority: optional
Section: devel
Source: linux-hwe-5.15
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 25605
Provides: linux-headers, linux-headers-3.0
Depends: linux-hwe-5.15-headers-5.15.0-43, libc6 (>= 2.22), libelf1 (>= 0.142), libssl1.1 (>= 1.1.0), zlib1g (>= 1:1.2.3.3)
Filename: pool/main/l/linux-hwe-5.15/linux-headers-5.15.0-43-generic_5.15.0-43.46~20.04.1_amd64.deb
Size: 2778708
MD5sum: 166c77a8a6cb15bbee82bf747f697eb4
SHA1: b85f93f240c49032147e725269b5d93926635f34
SHA256: 64f91532c224a84a5b35a61015672f4f435d000a044444bc0d261ec37b625587
SHA512: 759101ecc4915cb903a0d841a04c80ff2e842c6f65fdae558ab3a9ba8b17e4b3c49ee41c013c70eac99c7c412ee4a31589bfe19f30ee20a1666baa30974370fa
Description: Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
Description-md5: aa3765228191f57c200133c7d18acc9a

4. References on Linux Mint 20.3 «Una»

Источник

How to install kernel headers on Linux

Question: I need to install kernel headers to install a device driver for my kernel. What is a proper way to install matching kernel headers on [insert your Linux distro]?

When you compile a device driver a custom kernel module, you need to have kernel header files installed on your Linux system. Kernel headers are needed also when you build a userspace application which links directly against the kernel. When you install kernel headers in such cases, you must make sure to kernel headers are exactly matched with the kernel version of your system (e.g., 3.13.0-24-generic).

Читайте также:  Linux выполнение скрипта каждую минуту

If your kernel is the default version that comes with the distribution, or you upgraded it using the default package manager (e.g., apt-get , aptitude or yum ) from base repositories, you can install matching kernel headers using the package manager as well. On the other hand, if you downloaded the kernel source and compiled it manually, you can install matching kernel headers by using make command.

Here we assume that your kernel comes from base repositories of your Linux distribution, and see how we can install matching kernel headers.

Install Kernel Headers on Debian, Ubuntu or Linux Mint

Assuming that you did not manually compile the kernel, you can install matching kernel headers using apt-get command.

First, check if matching kernel headers are already available on your system using dpkg-query command.

$ dpkg-query -s linux-headers-$(uname -r)
dpkg-query: package 'linux-headers-3.11.0-26-generic' is not installed and no information is available

Go ahead and install matching kernel headers as follows.

$ sudo apt-get install linux-headers-$(uname -r)

Verify that matching kernel headers are successfully installed.

$ dpkg-query -s linux-headers-$(uname -r)
Package: linux-headers-3.11.0-26-generic Status: install ok installed

The default location of kernel headers on Debian, Ubuntu or Linux Mint is /usr/src .

Install Kernel Headers on Fedora, CentOS or RHEL

If you did not manually upgrade the kernel, you can install matching kernel headers using yum command.

First, check if matching kernel headers are already installed on your system. The default location of kernel header files is /usr/src/kernels/ .

If no matching kernel headers are found in that directory, go ahead and install kernel headers with yum command as follows.

$ sudo yum install kernel-devel

If the kernel header files installed by the above command do not match with your current kernel, this is because your kernel is outdated. In this case, update the installed kernel to the latest by running the following command. This will install the matching kernel automatically. You will need to reboot after updating the kernel.

Now verify that matching kernel headers are installed by running:

arch firmware ipc Makefile samples System.map vmlinux.id block fs Kconfig mm scripts tools crypto include kernel Module.symvers security usr drivers init lib net sound virt

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Читайте также:  Astra linux destination host unreachable

Источник

How to Install Kernel Headers in Ubuntu and Debian

In our last article, we have explained how to install kernel headers in CentOS 7. Kernel Headers contain the C header files for the Linux kernel, which offers the various function and structure definitions required when compiling any code that interfaces with the kernel, such as kernel modules or device drivers and some user programs.

It is very important to note that the kernel headers package you install should match with the currently installed kernel version on your system. If your kernel version ships with the default distribution installation or you have upgraded your Kernel using dpkg or apt package manager from the Ubuntu or Debian base repositories, then you must install matching kernel headers using package manager only. And if you’ve compiled kernel from sources, you must also install kernel headers from sources.

In this article, we will explain how to install Kernel Headers in Ubuntu and Debian Linux distributions using default package manager.

Install Kernel Headers in Ubuntu and Debian

First check your installed kernel version as well as kernel header package that matches your kernel version using following commands.

$ uname -r $ apt search linux-headers-$(uname -r)

Check Kernel Version and Kernel Headers in Ubuntu

On Debian, Ubuntu and their derivatives, all kernel header files can be found under /usr/src directory. You can check if the matching kernel headers for your kernel version are already installed on your system using the following command.

$ ls -l /usr/src/linux-headers-$(uname -r)

Check Kernel Headers in Ubuntu

From the above output, it’s clear that the matching kernel header directory doesn’t exist, meaning the package is not yet installed.

Before you can install the appropriate kernel headers, update your packages index, in order to grab information about the latest package releases, using the following command.

Then run the following command that follows to install the Linux Kernel headers package for your kernel version.

$ sudo apt install linux-headers-$(uname -r)

Install Kernel Headers in Ubuntu

Next, check if the matching kernel headers have been installed on your system using the following command

$ ls -l /usr/src/linux-headers-$(uname -r)

Verify Installed Kernel Headers in Ubuntu

That’s all! In this article, we have explained how to install kernel headers in Ubuntu and Debian Linux and other distributions in the Debian family tree.

Always keep in mind that to compile a kernel module, you will need the Linux kernel headers. If you have any quires, or thoughts to share, use the comment form below to reach us.

Источник

Оцените статью
Adblock
detector