It looks like you are using some old version of the library (from 2012).

The latest version, which does not contain the problematic "extern" block, can be found here: https://github.com/adafruit/DHT-sensor-library

(The default example works nicely with my Arduino Nano v3.0 and DHT22 sensor)

Answer from Viliam Simko on Stack Overflow
🌐
Arduino Forum
forum.arduino.cc › development tools › ide 1.x
fatal error: avr/io.h: No such file or directory - IDE 1.x - Arduino Forum
April 10, 2014 - I searched for an answer and found some older posts but not very helpful. I'm verifying the FadeUp sketch of the DmxMaster library and I get this error message. Where should this header file supposed to be? I guess it go…
Discussions

Avr/io.h: No such file or directory error when using Adafruit BNO08x library
Hello everybody, I connected adafruit bno085 sensor to my ESP32-S3 devkit. And I am trying to upload a program where i can see the output of IMU rotation vector. This is my ini file: [env:esp32-s3-devkitc-1] platform = espressif32 board = esp32-s3-devkitc-1 ; change MCU frequency board_build.f_cpu ... More on community.platformio.org
🌐 community.platformio.org
1
0
January 21, 2024
c - Why this avr/io.h header give me fatal error? - Stack Overflow
I add this header on my C program. And it gives me no such file or directory. Here is that error: fatal error: avr/io.h: No such file or directory. Here is all of my code: #include ... More on stackoverflow.com
🌐 stackoverflow.com
Fatal error: avr/io.h: No such file or directory
is there any chance that you could help me with a similar problem? My error message is In file included from C:\Users\Oscar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28:0, from C:\Users\Oscar\AppData\Local\arduino\sketches\38DDA74554AB4CFF65BBA1E1B... More on forum.arduino.cc
🌐 forum.arduino.cc
0
0
January 28, 2025
avr/io.h not found
Linux. Firmware 2.5 compilation. Throws an error when do Make or MK_ALL.sh. Apparently I don't understand something, but I suppose that since there is an include, it means that the library must be ... More on github.com
🌐 github.com
12
October 9, 2020
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Fatal error: avr/io.h: No such file or directory - Programming - Arduino Forum
January 28, 2025 - is there any chance that you could help me with a similar problem? My error message is In file included from C:\Users\Oscar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28:0, from C:\Users\Oscar\AppData\Local\arduino\sketches\38DDA74554AB4CFF65BBA1E1B35761E3\sketch\sketch_jan28a.ino.cpp:1: c:\users\oscar\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90:10: fatal error: avr/io.h:...
Find elsewhere
🌐
GitHub
github.com › micronucleus › micronucleus › issues › 189
avr/io.h not found · Issue #189 · micronucleus/micronucleus
October 9, 2020 - Linux. Firmware 2.5 compilation. Throws an error when do Make or MK_ALL.sh. Apparently I don't understand something, but I suppose that since there is an include, it means that the library must be somewhere in the system paths or somethi...
Author   maslaff
🌐
RepRap
reprap.org › forum › read.php
Arduino DUE, Marlin 1.1.9: fatal error: avr/io.h: No such file or directory
September 2, 2018 - So I have no problems there. Does any of you have a solution? Greeting, Chris Edited 1 time(s). Last edit at 09/02/2018 04:37PM by EcoF83R. ... Aloha :-) Ok, I have it! You have to create a folder 'avr' in '.../sketchbook/libraries' and copy the file 'io.h' into it.
🌐
Reddit
reddit.com › r/mechanicalkeyboards › qmk_firmware - opensuse tumbleweed - fatal error: avr/io.h: no such file or directory
r/MechanicalKeyboards on Reddit: qmk_firmware - OpenSUSE Tumbleweed - fatal error: avr/io.h: No such file or directory
April 12, 2019 -

I'm happy enough with that error as Tumbleweed installs the package in '/usr/avr/sys-root' so the header file is in /usr/avr/sys-root/include/avr/io.h

Rather then trying to change the Makefile, I struggle to read makefiles, I decided I'd simply put a link to where the include directory should be so:

ln -s /usr/avr/sys-root /usr/lib/avr

So now the header file is where you'd expect it to be '/usr/lib/avr/include/avr/io.h'

Trouble is that the qmk_firmware build still ain't happy with that. Perhaps it don't like links, but I thought that was transparent. Permissions on the directories and files are all good but still no jot.

If anybody could suggest a solution I'd be very grateful, failing that I'll have to install Ubuntu 16.04 somewhere.

🌐
GitHub
github.com › espressif › arduino-esp32 › issues › 2855
avr/io.h not found · Issue #2855 · espressif/arduino-esp32
June 4, 2019 - Include all pertinent information: What you are trying to do. to complie a simple sketch that includes FreeRTOS Describe your system( Hardware, computer, O/S, core version, environment) ESP32 WROOM Describe what is failing Compilation Show the shortest possible code that will duplicate the erro r#include <Arduino_FreeRTOS.h> void setup() { // put your setup code here, to run once: ... } Show the EXACT error message(it doesn't work is not enough) Arduino: 1.8.7 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (
Author   chrisaclark
🌐
Arduino Forum
forum.arduino.cc › projects › programming
"avr/io.h: No such file or directory" error when compiling for UNO R4 Minima - Programming - Arduino Forum
July 3, 2023 - Similar problem here. I've been running a CNC with GRBL on an UNO R3 just fine. I decided to upgrade the driver board and went with the new Minima board also. My computer recognizes the board, installed the grbl library,…
🌐
YouTube
youtube.com › vlogize
Troubleshooting "fatal error: avr/io.h: No such file or directory" in Arduino - YouTube
Disclaimer/Disclosure: Some of the content was synthetically produced using various Generative AI (artificial intelligence) tools; so, there may be inaccurac...
Published   March 2, 2024
Views   503
🌐
GitHub
github.com › lucadentella › TOTP-Arduino › issues › 11
fatal error: avr/io.h: No such file or directory · Issue #11 · lucadentella/TOTP-Arduino
March 30, 2020 - Hi, trying to get this running, but it seems that some files are missing or not working in the latest Arduino versions, I am getting this ~/Arduino/libraries/Sha/sha1.cpp:2:20: fatal error: avr/io.h: No such file or directory Used: ~/.ar...
🌐
GitHub
github.com › adafruit › Adafruit-GFX-Library › issues › 121
[RESOLVED] Issue with arduino Due- AVR/Io.h not found · Issue #121 · adafruit/Adafruit-GFX-Library
May 7, 2017 - Building this for the arduino due results in the error: "C:/Users/Brice/AppData/Local/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -n...
Author   Bjohnson131
🌐
Arduino Forum
forum.arduino.cc › projects › programming
MEGA ATmega2560 + ESP8266 CH340G - error: avr/io.h: No such file or directory - Programming - Arduino Forum
January 16, 2023 - Hi, I'm trying to upload the MEGA + ESP8266 code where I include the ClickEncoder.h library, ESP8266WebServer.h, ESP8266WiFi.h and others in the import. The problem occurs when I try to upload the code after setting up the Generic ESP8266 Module board, setting up the port, an error message pops up: In file included from C:\Users\mauz\Desktop\Arduino\MainMenu.ino:3: c:\Users\mauz\Documents\Arduino\libraries\encoder-arduino/ClickEncoder.h:18:10: fatal error: avr/io.h: No such file or directory ...