0

I'm learning how to write a module, and when I initialize "make", I get

make[1]: *** /lib/modules/6.6.6-060606-generic/build: No such file or directory.  Stop.

With this Makefile:

obj-m = foo.o

KVERSION = $(shell uname -r)

all:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

I've found this as a potential solution. As you can see, I'm running 6.6.6 but Mint only supports an inferior Kernel. Is it okay if I download my latest distro headers and use those?

1 Answer 1

0

In terminal

wget https://kernel.ubuntu.com/mainline/v6.6.6/amd64/linux-headers-6.6.6-060606-generic_6.6.6-060606.202312111032_amd64.deb
wget https://kernel.ubuntu.com/mainline/v6.6.6/amd64/linux-headers-6.6.6-060606_6.6.6-060606.202312111032_all.deb
sudo dpkg -i linux-headers-*.deb

Then see if you can compile

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Dec 17, 2023 at 20:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .