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

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

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest