The new system is missing "Linux headers" and the search fails

More
18 Jun 2022 04:16 #245376 by EdisonBin
Hello, brothers:
I downloaded this version of the system from the official linuxcnc website yesterday:
“LinuxCNC 2.8.2 Debian 10 Buster PREEMPT-RT ISO”
And the installation was successful. Everything is OK

But when I need to use the "make" command today, I will be prompted:
"/lib/modules/4.19.0-17-rt-and64/build: no that file or directory"
As shown in figure 2

I searched for a long time and found that I lacked "headers"!
So I used the command: "sudo apt get install Linux headers-$(uname -r)"

But it reminds me that I failed:
E: Unable to locate package linux-headers-4.19.0-17-rt-amd
E: Unable to find any packages according to Glob "linux-headers-4.19.0-17-rt-amd"
E: Cannot find any packages according to the regular expression "linux-headers-4.19.0-17-rt-amd"
As shown in Figure 3

How I should solve this thorny problem has been bothering me all day
Thank you
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Jun 2022 12:51 #245394 by tommylight
sudo apt-get update
sudo apt-get install linux-headers-4.19.0-17-rt-amd

Please Log in or Create an account to join the conversation.

More
20 Jun 2022 00:30 #245459 by EdisonBin
Thank you, Tommy!
I used another method to solve this problem, because I still can't find the kernel header file of this version using your method.
Is it because this header file is too old and out of date.

I used the following command:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Then I found that my system kernel changed from "4.19.0-17-rt-amd" to "4.19.0-20-rt-amd"

Then I can use this command:
"sudo apt get install Linux headers-$(uname -r)”

But I am puzzled whether my kernel version has been upgraded?
Which command caused this?
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
20 Jun 2022 02:41 #245465 by tommylight

Please Log in or Create an account to join the conversation.

Time to create page: 0.346 seconds
Powered by Kunena Forum