Celeb Glow
general | April 04, 2026

fatal error: linux/i2c-dev.h: No such file or directory 34 | #include

In my Ubuntu 20.4 virtual machine I have installed RIOT OS for IOT devices. I am experiencing this error when compiling the program main.c (this take place by the command make BOARD=nucleo-f401re) that should have access to a I2C sensor readings. What is wrong ?

1

1 Answer

Try this in terminal:

sudo apt install linux-headers-`uname -r`

and try compiling again. On my system, i2c-dev.h is part of the kernel headers of the kernel that I use.

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy