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

Problem:

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

error.txt
minio-cpp/include/select.h:19:10: fatal error: pugixml.hpp: No such file or directory
   19 | #include <pugixml.hpp>

Solution

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

install_pugixml.sh
sudo apt -y install libpugixml-dev

 


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