Linux self-study experience-Install kernel header file

Source: Internet
Author: User

For Linux Beginners There are a lot of problems to explore, not exactly according to the book chapters in order to learn, some knowledge and problems are like installing software as a dependency. Just install the Linux system needs to install the driver, install the driver will install the kernel header file, otherwise it will report various errors, such as the directory is not found, XXX does not exist. When installing the kernel header file, you may encounter the "not found package ..." ”

650) this.width=650; "title=" Error "src=" Http://s3.51cto.com/wyfs02/M00/73/83/wKiom1X_yo3gubSJAAEvzdYozrU692.jpg "alt = "Wkiom1x_yo3gubsjaaevzdyozru692.jpg"/> Nonsense, the following is how to install the kernel header file, in this article Kali Linux as an example, Kali Linux is a Debian-based Linux distribution, This article applies to other Debian-based Linux.
The following tasks need to be prepared before installation:
1. Ensure that the machine can surf the internet normally
2. Ensure the correct source
It is important to make sure that you can surf the internet properly, adding a source that works well and needing to modify the/etc/apt/sources.list file. Use the steps:
In the terminal, enter :

Nano/etc/apt/sources.list

Open the Sources.list file with a "#" comment before the source is spoken. Add the following source (no system corresponding to the source is not the same, can not be mixed, later I will collate knowledge about the source)
Deb Http://mirrors.ustc.edu.cn/kali Kali main Non-free contrib
Deb-src Http://mirrors.ustc.edu.cn/kali Kali main Non-free contrib
Deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib Non-free
Deb Http://mirrors.aliyun.com/kali Kali main Non-free contrib
Deb-src Http://mirrors.aliyun.com/kali Kali main Non-free contrib
Deb http://mirrors.aliyun.com/kali-security kali/updates main contrib Non-free
Press Ctrl+x to select the Y file name to save and exit.
Running in the terminal

Apt-get Update

Command Refresh Source
Then use

Apt-get Dist-upgrade

Command Update system
End Use

Apt-get install linux-headers-' uname-r '

(Note that the punctuation here is the key below the keyboard ESC) or install the kernel header file using the Apt-get install linux-headers-$ (uname-r) command.
Use after installation is complete

Dpkg-query-s linux-headers-' Uname-r '

or Dpkg-query-s linux-headers-$ (uname-r) command to check if the kernel header file was successfully installed



Here, we need to expand the knowledge points to know: Software dependencies under Linux, how to use nano tools, format of source sources.list files, apt-get common commands, Apt-get Dist-upgrade and Apt-get The difference between upgrade.


This article is from the "Inner Peace" blog, make sure to keep this source http://isnull.blog.51cto.com/10388625/1696821

Linux self-study experience-Install kernel header file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.