How to fix C++ "fatal error: INIReader.h: No such file or directory" on Ubuntu

Problem:

While trying to compile your C++ project, you see an error message such as

ini_error.txt
minio-cpp/include/providers.h:19:10: fatal error: INIReader.h: No such file or directory
   19 | #include <INIReader.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

Solution

You need to install the inih library. On Ubuntu or Debian, you can do that using

install_libinih.sh
sudo apt -y install libinih-dev

 


Check out similar posts by category: C/C++, GCC Errors