Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
We have project in Japan and we use PCAN-USB on our hardware
OS: Ubuntu 20.04 LTS, Kernel 5.13.0-30-generic
We try to install PCAN-USB driver for two hardware
- Tiger Lake (i5-1145G7E) - OK
- Alder Lake (i7-1255U) - Fail
The SOP we did is below:
[1] download peak-linux-driver-8.15.2.tar.gz, and unzip it
[2] install g++ and libpopt-dev
$ sudo apt-get install build-essential g++
$ sudo apt-get install libpopt-dev
[3] Regarding the directory of peak-linux-driver-8.15.2
$ make clean
$ make
$ [sudo] make -C driver install
$ [sudo] make -C lib install
$ [sudo] make -C test install
$ [sudo] make -C libpcanbasic install
[4] After installation
$ wget -q https://urldefense.com/v3/__http://www. ... Uz0L5CshEA$ -O- | sudo tee /etc/apt/sources.list.d/peak-system.list
$ wget -q https://urldefense.com/v3/__http://www. ... Uz1I9QS3eA$ -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install pcanview-ncurses
[5] We disable secure boot and restart the system
$ sudo modprobe pcan
We install the PCAN-USB into our PC and type pcanview, and start the system
We are unable to install driver in i7-1255U and the error message shown below:
make [1]: directory '/hom/ubuntu/peak-linux-driver-8.15.2/driver' に入ります
Makefile:131: *** "Unable to automatically find the Kernel headers. There are mandatory to build the pcan dirver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel.". Stop
make [1]: directory '/hom/ubuntu/peak-linux-driver-8.15.2/driver' から出ます
make: *** [Makefile:84: all] Error 2
We try to install new driver 8.16.0 and the one you released on 2024/1/18 v8.17, but we failed to install on the new intel platform Alder Lake i7-1255U
the error message always show after we type SOP [3] $ make clean
is there anything we can do for SOP? we are able to install drivers on intel old platform tiger lake but failed to install drivers on intel i7-1255U, we hope you can give us some advices, thanks and regards,
Stephen
OS: Ubuntu 20.04 LTS, Kernel 5.13.0-30-generic
We try to install PCAN-USB driver for two hardware
- Tiger Lake (i5-1145G7E) - OK
- Alder Lake (i7-1255U) - Fail
The SOP we did is below:
[1] download peak-linux-driver-8.15.2.tar.gz, and unzip it
[2] install g++ and libpopt-dev
$ sudo apt-get install build-essential g++
$ sudo apt-get install libpopt-dev
[3] Regarding the directory of peak-linux-driver-8.15.2
$ make clean
$ make
$ [sudo] make -C driver install
$ [sudo] make -C lib install
$ [sudo] make -C test install
$ [sudo] make -C libpcanbasic install
[4] After installation
$ wget -q https://urldefense.com/v3/__http://www. ... Uz0L5CshEA$ -O- | sudo tee /etc/apt/sources.list.d/peak-system.list
$ wget -q https://urldefense.com/v3/__http://www. ... Uz1I9QS3eA$ -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install pcanview-ncurses
[5] We disable secure boot and restart the system
$ sudo modprobe pcan
We install the PCAN-USB into our PC and type pcanview, and start the system
We are unable to install driver in i7-1255U and the error message shown below:
make [1]: directory '/hom/ubuntu/peak-linux-driver-8.15.2/driver' に入ります
Makefile:131: *** "Unable to automatically find the Kernel headers. There are mandatory to build the pcan dirver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel.". Stop
make [1]: directory '/hom/ubuntu/peak-linux-driver-8.15.2/driver' から出ます
make: *** [Makefile:84: all] Error 2
We try to install new driver 8.16.0 and the one you released on 2024/1/18 v8.17, but we failed to install on the new intel platform Alder Lake i7-1255U
the error message always show after we type SOP [3] $ make clean
is there anything we can do for SOP? we are able to install drivers on intel old platform tiger lake but failed to install drivers on intel i7-1255U, we hope you can give us some advices, thanks and regards,
Stephen
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Hi,
the error is displayed. The kernel headers are missing. Please update the system, reboot once and try again, please also use latest driver 8.17:
sudo apt update
sudo apt upgrade
sudo reboot
If the kernel headers are still missing, post the output of "uname -a" to see which kernel is used on your system.
regards
Michael
the error is displayed. The kernel headers are missing. Please update the system, reboot once and try again, please also use latest driver 8.17:
sudo apt update
sudo apt upgrade
sudo reboot
If the kernel headers are still missing, post the output of "uname -a" to see which kernel is used on your system.
regards
Michael
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Hi, Michael
We tried update, upgrade and reboot, but we are not able to use latest driver 8.17
The kernel is 5.19.17-05917-generic
regards,
Stephen
We tried update, upgrade and reboot, but we are not able to use latest driver 8.17
The kernel is 5.19.17-05917-generic
regards,
Stephen
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Hi,
please post the output of the driver make process. Did you install the kernel headers?
regards
Michael
please post the output of the driver make process. Did you install the kernel headers?
regards
Michael
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Dear Michael:
Can you tell us how to build a Kernel headers? We tried old intel platform, we can install drivers without this issue. So we are not sure how to build a kernel headers.
We upgrate and upgrade and reboot, and this is the version information below, and the error message, please kindly check below:
Version information:
Linux ubuntu-QBiX-Pro-ADLA1255H 5.19.17-051917-generic
linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04
linux-image-generic-hwe-20.04
g++ Version 4:9.3.0-1ubuntu2
build-essential Version 12.8ubuntu1.1
libpopt-dev Version 1.16-14
Error Message:
root@ubuntu-QBiX-Pro-ADLA1255H:~# cd /home/ubuntu/sugino/peak-linux-driver-8.17.0
root@ubuntu-QBiX-Pro-ADLA1255H:/home/ubuntu/sugino/peak-linux-driver-8.17.0# make clean
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' に入ります
Makefile:131: *** "Unable to automatically find the Kernel headers. These are mandatory to build the pcan driver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel.". 中止.
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' から出ます
make: *** [Makefile:95: clean] エラー 2
root@ubuntu-QBiX-Pro-ADLA1255H:/home/ubuntu/sugino/peak-linux-driver-8.17.0# make
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' に入ります
Makefile:131: *** "Unable to automatically find the Kernel headers. These are mandatory to build the pcan driver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel.". 中止.
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' から出ます
make: *** [Makefile:84: all] エラー 2
root@ubuntu-QBiX-Pro-ADLA1255H:/home/ubuntu/sugino/peak-linux-driver-8.17.0#
Can you tell us how to build a Kernel headers? We tried old intel platform, we can install drivers without this issue. So we are not sure how to build a kernel headers.
We upgrate and upgrade and reboot, and this is the version information below, and the error message, please kindly check below:
Version information:
Linux ubuntu-QBiX-Pro-ADLA1255H 5.19.17-051917-generic
linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04
linux-image-generic-hwe-20.04
g++ Version 4:9.3.0-1ubuntu2
build-essential Version 12.8ubuntu1.1
libpopt-dev Version 1.16-14
Error Message:
root@ubuntu-QBiX-Pro-ADLA1255H:~# cd /home/ubuntu/sugino/peak-linux-driver-8.17.0
root@ubuntu-QBiX-Pro-ADLA1255H:/home/ubuntu/sugino/peak-linux-driver-8.17.0# make clean
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' に入ります
Makefile:131: *** "Unable to automatically find the Kernel headers. These are mandatory to build the pcan driver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel.". 中止.
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' から出ます
make: *** [Makefile:95: clean] エラー 2
root@ubuntu-QBiX-Pro-ADLA1255H:/home/ubuntu/sugino/peak-linux-driver-8.17.0# make
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' に入ります
Makefile:131: *** "Unable to automatically find the Kernel headers. These are mandatory to build the pcan driver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel.". 中止.
make[1]: ディレクトリ '/home/ubuntu/sugino/peak-linux-driver-8.17.0/driver' から出ます
make: *** [Makefile:84: all] エラー 2
root@ubuntu-QBiX-Pro-ADLA1255H:/home/ubuntu/sugino/peak-linux-driver-8.17.0#
- S.Grosjean
- Software Development
- Posts: 352
- Joined: Wed 4. Jul 2012, 17:02
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Hi,
Secondly, please give us the output of:
So that we'll definitively know if linux headers package is or isn't installed.
Regards,
First, it's generally not a good idea to build the driver as root because PATH may be different.root@ubuntu-QBiX-Pro-ADLA1255H:/home/ubuntu/sugino/peak-linux-driver-8.17.0# make
Secondly, please give us the output of:
Code: Select all
$ dpkg --get-selections "linux-headers*"
Regards,
— Stéphane
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Dears:
We tested and the result is below:
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~$ sudo -i
[sudo] ubuntu のパスワード:
root@ubuntu-QBiX-Pro-ADLA1255H:~# dpkg --get-selections "linux-headers*"
linux-headers-5.11.0-27-generic install
linux-headers-5.15.0-91-generic install
linux-headers-5.15.0-92-generic install
linux-headers-5.15.0-94-generic install
linux-headers-5.19.17-051917 install
linux-headers-generic-hwe-20.04 install
root@ubuntu-QBiX-Pro-ADLA1255H:~#
Thanks and regards,
Stephen
We tested and the result is below:
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~$ sudo -i
[sudo] ubuntu のパスワード:
root@ubuntu-QBiX-Pro-ADLA1255H:~# dpkg --get-selections "linux-headers*"
linux-headers-5.11.0-27-generic install
linux-headers-5.15.0-91-generic install
linux-headers-5.15.0-92-generic install
linux-headers-5.15.0-94-generic install
linux-headers-5.19.17-051917 install
linux-headers-generic-hwe-20.04 install
root@ubuntu-QBiX-Pro-ADLA1255H:~#
Thanks and regards,
Stephen
- S.Grosjean
- Software Development
- Posts: 352
- Joined: Wed 4. Jul 2012, 17:02
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Hi,
you wrote:
... which is not installed according to:
Regards,
you wrote:
Therefore the Makefile is looking for linux headers of 5.19.17-05917-generic, which are generally installed when installing "linux-headers-5.19.17-05917-generic"...The kernel is 5.19.17-05917-generic
... which is not installed according to:
On the other hand, if you know where the headers of your hand-made kernel are stored, then as indicated, use the KERNEL_LOCATION variable on the make command line, something like:root@ubuntu-QBiX-Pro-ADLA1255H:~# dpkg --get-selections "linux-headers*"
linux-headers-5.11.0-27-generic install
linux-headers-5.15.0-91-generic install
linux-headers-5.15.0-92-generic install
linux-headers-5.15.0-94-generic install
linux-headers-5.19.17-051917 install
linux-headers-generic-hwe-20.04 install
Code: Select all
$ cd driver
$ make KERNEL_LOCATION=/usr/src/...
— Stéphane
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Hi,
Do you mean 5.19.17-05917-generic is our kernel version, but what we install is linux-headers-5.19.17-051917 so it cause makefile failed?
Should we reinstall again?
I asked our client to try
$ cd driver
$ make KERNEL_LOCATION=/usr/src/...
the results shown below:
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~$ cd driver
bash: cd: driver: そのようなファイルやディレクトリはありません
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~$ cd /home/ubuntu/sugino/peak-linux-driver-8.17.0/driver
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~/sugino/peak-linux-driver-8.17.0/driver$ make KERNEL_LOCATION=/usr/src/
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Ubuntu v20.04
*** Host machine kernel version=5.19.17-051917-generic
*** Driver kernel version=5.19.17-051917-generic (5.19.17)
*** Path to kernel sources=/usr/src/
*** use KBUILD=yes
*** use DKMS=
*** gcc version=9
***
/bin/sh: 1: cannot create dkms.conf: Permission denied
make: *** [Makefile:587: dkms.conf] エラー 2
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~/sugino/peak-linux-driver-8.17.0/driver$
Stephen
Do you mean 5.19.17-05917-generic is our kernel version, but what we install is linux-headers-5.19.17-051917 so it cause makefile failed?
Should we reinstall again?
I asked our client to try
$ cd driver
$ make KERNEL_LOCATION=/usr/src/...
the results shown below:
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~$ cd driver
bash: cd: driver: そのようなファイルやディレクトリはありません
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~$ cd /home/ubuntu/sugino/peak-linux-driver-8.17.0/driver
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~/sugino/peak-linux-driver-8.17.0/driver$ make KERNEL_LOCATION=/usr/src/
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Ubuntu v20.04
*** Host machine kernel version=5.19.17-051917-generic
*** Driver kernel version=5.19.17-051917-generic (5.19.17)
*** Path to kernel sources=/usr/src/
*** use KBUILD=yes
*** use DKMS=
*** gcc version=9
***
/bin/sh: 1: cannot create dkms.conf: Permission denied
make: *** [Makefile:587: dkms.conf] エラー 2
ubuntu@ubuntu-QBiX-Pro-ADLA1255H:~/sugino/peak-linux-driver-8.17.0/driver$
Stephen
- S.Grosjean
- Software Development
- Posts: 352
- Joined: Wed 4. Jul 2012, 17:02
Re: Ubuntu 20.04 LTS (kernel 5.13.0-30-generic): "Unable to automatically find the Kernel headers"
Hi,
When I wrote:
even though your installation seems quite strange to me: you're running a 5.19.17-051917-generic kernel:
When I wrote:
"/usr/src/..." was an example, a template to put the actual directory of linux headers installed on your machine. I suppose that, in your case, you should write:$ cd driver
$ make KERNEL_LOCATION=/usr/src/...
Code: Select all
$ cd driver
$ make KERNEL_LOCATION=/usr/src/linux-headers-5.19.17-05917-generic
so you should have installed the "linux-headers-5.19.17-051917-generic" package, but that's obviously not the case, as it doesn't appear in the list you gave me:"*** Host machine kernel version=5.19.17-051917-generic"
Regards,root@ubuntu-QBiX-Pro-ADLA1255H:~# dpkg --get-selections "linux-headers*"
linux-headers-5.11.0-27-generic install
linux-headers-5.15.0-91-generic install
linux-headers-5.15.0-92-generic install
linux-headers-5.15.0-94-generic install
linux-headers-5.19.17-051917 install
linux-headers-generic-hwe-20.04 install
— Stéphane