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
"avr/io.h: No such file or directory" error when compiling for UNO R4 Minima
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, but I can't flash the firmware itself onto the board. More on forum.arduino.cc
🌐 forum.arduino.cc
0
1
July 3, 2023
c - avr/io.h No such file or directory error when compiling using avr-gcc - Arduino Stack Exchange
I am trying to use the atmega328p as standalone microchip and program it. I ama using an Arduino Uno as ISP. I have written a simple program to test it however when I try to compile it using avr-... More on arduino.stackexchange.com
🌐 arduino.stackexchange.com
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
🌐
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,…
Find elsewhere
🌐
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:...
🌐
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 - I have already tried the folder ... directories to copy. But no matter what I do, each time the same error message appears. In the version 1.0.0 (which I use for years and which also works well) is "avr/io.h" does not exist. So I have no problems there. Does any of you have a ...
🌐
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
🌐
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...
🌐
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
January 24, 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.

🌐
Arduino Forum
forum.arduino.cc › projects › programming
[SOLVED]'#include <avr/io.h>' No such file or directory
March 16, 2018 - I am currently programming my 7³ RGB LEDCube and using an Arduino Mega. With its 8kB RAM is the Mega pretty good for LEDCubes but some animations use up to 6.5kB RAM and the Mega starts to limit me by coding animations. Because of this did I order a STM32 which should have enough RAM for even ...