0

Problem: When running "make" command I am met with errors

I've been trying to install a SocketCAN driver on my pi device so I can communicate with a USB CAN Adapter. I've been following Systecs manuals for downloading/installing said software. Link to Systec Website and reading their Manual for Windows/Linux devices. When I downloaded the SocketCAN driver and followed the instructions and used the the make command on the pi device I get the error:

$ make
make -C /lib/modules/6.1.21-v8+/build M=/home/pi/systec_can-v1.0.7 modules
make[1]: *** /lib/modules/6.1.21-v8+/build: No such file or directory.  Stop.
make: *** [Makefile:22: all] Error 2

I tried this on ubuntu and it works fine. (Although the instructions are on a Ubuntu system so this makes sense) It does not work on the pi however. I was wondering any solutions for this problem, or if anyone else has run into this.

4
  • 1
    Have you checked if /lib/modules/6.1.21-v8+/build/ exists? It doesn't by default.
    – goldilocks
    Commented Apr 14 at 18:25
  • @goldilocks just checked, it did not exist, do I just create the dir manually?
    – user162422
    Commented Apr 14 at 20:39
  • Yes, make sure it ends up with appropriate permissions/ownership.
    – goldilocks
    Commented Apr 14 at 21:09
  • I also ran the command: sudo apt-get install -reinstall raspberrypi-kernel-headers and the build folder appeared. I assume if I made a build folder manually the same would happen, thanks for the help. @goldilocks
    – user162422
    Commented Apr 14 at 23:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.