The Apache Arrow C++ library is the foundation of the Arrow project, providing high-performance data structures and algorithms for columnar data processing.
Pre-compiled Binaries
The easiest way to install Apache Arrow C++ is to use pre-compiled binary packages.
System Package Managers
Install Arrow C++ using your system’s package manager:
Ubuntu/Debian
RHEL/CentOS/Fedora
macOS (Homebrew)
conda
# Add Apache Arrow repository
sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/ $( lsb_release --id --short | tr 'A-Z' 'a-z' ) /apache-arrow-apt-source-latest- $( lsb_release --codename --short ) .deb
sudo apt install -y -V ./apache-arrow-apt-source-latest- $( lsb_release --codename --short ) .deb
sudo apt update
# Install Arrow C++
sudo apt install -y -V libarrow-dev
# Optional: Install additional Arrow libraries
sudo apt install -y -V libarrow-glib-dev # GLib bindings
sudo apt install -y -V libarrow-dataset-dev # Dataset API
sudo apt install -y -V libarrow-flight-dev # Arrow Flight RPC
sudo apt install -y -V libparquet-dev # Parquet support
Verifying Installation
After installation, verify that Arrow C++ is correctly installed:
Check pkg-config
Verify the Arrow package configuration: pkg-config --modversion arrow
This should output the installed Arrow version.
Check header files
Ensure the Arrow headers are accessible: ls /usr/include/arrow/ # Linux
ls /usr/local/include/arrow/ # macOS
Test with a simple program
Create a simple C++ program to test the installation: #include <arrow/api.h>
#include <iostream>
int main () {
std ::cout << "Arrow version: "
<< ARROW_VERSION_STRING << std ::endl;
return 0 ;
}
Compile and run: g++ test.cpp -o test $( pkg-config --cflags --libs arrow )
./test
Building from Source
For development or custom configurations, you can build Arrow C++ from source:
As of Arrow 23.0.0, building from source requires a C++20 compatible compiler:
GCC 11 or later
Clang 12 or later
MSVC 2019 16.10 or later
Install dependencies
sudo apt install -y \
build-essential \
cmake \
git \
libssl-dev \
libcurl4-openssl-dev
Clone the repository
git clone https://github.com/apache/arrow.git
cd arrow/cpp
Configure and build
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DARROW_PARQUET=ON \
-DARROW_DATASET=ON
make -j$( nproc )
sudo make install
Building from source can take significant time and resources. Pre-compiled binaries are recommended for most users.
Common Features
When installing Arrow C++, you can enable additional features:
Parquet : Read/write Apache Parquet files
Dataset API : Work with multi-file datasets
Flight RPC : High-performance data transport
Compute : Expression evaluation and aggregations
CUDA : GPU acceleration support
S3 : Amazon S3 filesystem support
GCS : Google Cloud Storage support
Refer to the C++ Development Documentation for detailed feature configuration.
Troubleshooting
pkg-config not finding arrow
Ensure the PKG_CONFIG_PATH includes the Arrow installation directory: export PKG_CONFIG_PATH = / usr / local / lib / pkgconfig : $PKG_CONFIG_PATH
Linking errors when compiling
Make sure to include all required Arrow libraries: g++ program.cpp -o program $( pkg-config --cflags --libs arrow arrow-dataset parquet )
Remove old Arrow installations before installing a new version: # Ubuntu/Debian
sudo apt remove libarrow-dev
# macOS
brew uninstall apache-arrow
Next Steps
Now that you have Arrow C++ installed: