Rikuiku
Posts: 3
Joined: Thu Dec 28, 2017 9:27 pm

Cannot use make (Linux headers missing)

Thu Dec 28, 2017 9:39 pm

Code: Select all

sebastian@solusthink ~/Downloads/acpi_call-master $ make
make -C /lib/modules/4.14.9-42.current/build M=/home/sebastian/Downloads/acpi_call-master modules
make[1]: *** /lib/modules/4.14.9-42.current/build: No such file or directory.  Stop.
make: *** [Makefile:8: default] Error 2
I've installed the linux-lts-headers, linux-headers and system.devel packages and none of them worked. Maybe I'm doing something wrong.

User avatar
kyrios
Posts: 1520
Joined: Thu Sep 22, 2016 4:20 pm

Re: Cannot use make (Linux headers missing)

Thu Dec 28, 2017 10:00 pm

Rikuiku wrote:
Thu Dec 28, 2017 9:39 pm

Code: Select all

sebastian@solusthink ~/Downloads/acpi_call-master $ make
make -C /lib/modules/4.14.9-42.current/build M=/home/sebastian/Downloads/acpi_call-master modules
make[1]: *** /lib/modules/4.14.9-42.current/build: No such file or directory.  Stop.
make: *** [Makefile:8: default] Error 2
I've installed the linux-lts-headers, linux-headers and system.devel packages and none of them worked. Maybe I'm doing something wrong.
Since you're running the linux-current kernel (4.14.19), you have to install the linux-current-headers package.

Rikuiku
Posts: 3
Joined: Thu Dec 28, 2017 9:27 pm

Re: Cannot use make (Linux headers missing)

Fri Dec 29, 2017 2:59 am

Oh well, my bad, I actually tried to install "linux-headers-current" instead of "linux-current-headers".

Now I have this problem, I'm trying to compile acpi_call (https://github.com/mkottman/acpi_call) :

Code: Select all

make -C /lib/modules/4.14.9-42.current/build M=/home/sebastian/Downloads/acpi_call-master modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.9-42.current'
make[2]: *** No rule to make target 'tools/objtool/objtool', needed by '/home/sebastian/Downloads/acpi_call-master/acpi_call.o'.  Stop.
make[1]: *** [Makefile:1504: _module_/home/sebastian/Downloads/acpi_call-master] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.9-42.current'
make: *** [Makefile:8: default] Error 2

User avatar
kyrios
Posts: 1520
Joined: Thu Sep 22, 2016 4:20 pm

Re: Cannot use make (Linux headers missing)

Fri Dec 29, 2017 9:23 am

Rikuiku wrote:
Fri Dec 29, 2017 2:59 am
Oh well, my bad, I actually tried to install "linux-headers-current" instead of "linux-current-headers".

Now I have this problem, I'm trying to compile acpi_call (https://github.com/mkottman/acpi_call) :

Code: Select all

make -C /lib/modules/4.14.9-42.current/build M=/home/sebastian/Downloads/acpi_call-master modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.9-42.current'
make[2]: *** No rule to make target 'tools/objtool/objtool', needed by '/home/sebastian/Downloads/acpi_call-master/acpi_call.o'.  Stop.
make[1]: *** [Makefile:1504: _module_/home/sebastian/Downloads/acpi_call-master] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.9-42.current'
make: *** [Makefile:8: default] Error 2
Try to patch the acpi_call.c file with the below commands:

Code: Select all

sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
sed -i 's|asm/uaccess.h|linux/uaccess.h|' acpi_call.c

Rikuiku
Posts: 3
Joined: Thu Dec 28, 2017 9:27 pm

Re: Cannot use make (Linux headers missing)

Sat Dec 30, 2017 5:20 am

kyrios wrote:
Fri Dec 29, 2017 9:23 am

Try to patch the acpi_call.c file with the below commands:

Code: Select all

sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
sed -i 's|asm/uaccess.h|linux/uaccess.h|' acpi_call.c
I've already done that. It's still giving me the same error.

Return to “Tutorials”