How to fix GCC fatal error: parquet/arrow/writer.h: No such file or directory

Problem:

While compiling your C++ application, you see an error message like

compiler_error.txt
src/main.cpp:6:10: fatal error: parquet/arrow/writer.h: No such file or directory
    6 | #include <parquet/arrow/writer.h>

Solution

You need to install the Parquet C++ libraries which are shipped together with the Arrow libraries.

On Ubuntu, you can do that using

install_arrow_libs.sh
sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
wget "https://apache.jfrog.io/artifactory/arrow/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/apache-arrow-apt-source-latest-$(lsb_release -cs).deb"
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update -y
sudo apt -y install libparquet-dev

For other operating systems, see the official Arrow installation guide,


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