I was installing CP210x drivers on my Ubuntu 22.04. In its instruction, the first step was to run make cp210x
on Terminal windows. But, while executing it, there was an error message said that linux/slab.h
was not found.
I had tried steps which were said to be the resolution of this problem
First, I tried installing the linux-headers
package for my current kernel version by running these commands on the Terminal window.
uname -r" on the terminal
sudo apt-get install linux-headers-$(uname -r)
make cp210x" again
.
Second, from another source, (in this case the file err.h
that not found, but I thought it would work since those files are from the same /linux
directory) it was said that I needed the package linux-libc-dev
.
sudo apt-get update
sudo apt-get install linux-libc-dev linux-headers-generic
But all resolutions above didn't resolve anything, I was just the same before I tried to do those steps. What should I do? Is there any sollutions?
Things that might help you to find a solution or recommendation:
- I installed Arduino 2.0.4 via AppImage on Ubuntu 2.0.4
- I have also installed esp32 2.0.7 by Expressif Systems
make
rather thanmake cp210x
- that will cause it to run a command relative to the kernel source tree, likemake -C /lib/modules/$(uname -r)/build M=/home/username/src/cp210x modules
rather than a simplecc ... -o
command. – steeldriver Mar 16 '23 at 11:51