How do I install libraries and fix missing library errors?
If you see an error like No such file or directory for a header file (for example #include <Something.h>), Arduino IDE cannot find the library.
Fix 1: Use Library Manager (recommended)
- Open Tools > Manage Libraries...
- Search for the library name.
- Click Install.
This is the safest approach because it installs to the correct folder and handles updates.
Fix 2: Install a ZIP library
- Download the library as a ZIP.
- In Arduino IDE: Sketch > Include Library > Add .ZIP Library...
- Select the ZIP.
Avoid manually unzipping into random folders. Arduino IDE expects libraries in a specific directory.
Common pitfalls
- Wrong board core: ESP32 libraries often require the ESP32 board package installed.
- Multiple copies: Having two versions of the same library can cause strange compile errors.
- Bad include name: The library folder name and include file name do not always match.
- Restart required: Sometimes you need to restart Arduino IDE after installing a library.
Bottom line
Install libraries using Library Manager whenever possible. If you must use a ZIP, install it through Arduino IDE, not by dragging folders around.
Related: Why can't I upload code? · What does this error message mean? · How do I install Arduino IDE and drivers?