如何获得支持 lz4 的 R 的箭头包?

How to get the arrow package for R with lz4 support?

install.packages('arrow') 安装的 R 软件包 arrow 没有 lz4 支持:

codec_is_available('lz4')
# [1] FALSE

包版本为:

packageVersion('arrow')
# [1] ‘0.17.1’

这是在 Ubuntu 20.04.

如何获得 R arrowlz4 支持?

根据 docs,您可以在从源构建时使用 export LIBARROW_MINIMAL=false 来构建支持压缩的构建:

You can also install the R package from a git checkout:

git clone https://github.com/apache/arrow
cd arrow/r
R CMD INSTALL .

If you don't already have the Arrow C++ libraries on your system, when installing the R package from source, it will also download and build the Arrow C++ libraries for you. To speed installation up, you can set

export LIBARROW_BINARY=true

to look for C++ binaries prebuilt for your Linux distribution/version. Alternatively, you can set

export LIBARROW_MINIMAL=false

to build the Arrow libraries with optional features such as compression libraries enabled. This will increase the build time but provides many useful features. Prebuilt binaries are built with this flag enabled, so you get the full functionality by using them as well.

Nick ODell 的答案对我不起作用,运行 ubuntu 18.04 在 docker 容器中。

有效的方法: (1) 首先在此处安装副标题 Debian GNU/Linux and Ubuntu: 下提到的库:https://arrow.apache.org/install/ (2)正常安装r-arrow

sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
wget https://apache.bintray.com/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt install -y -V libarrow-dev # For C++
sudo apt install -y -V libarrow-glib-dev # For GLib (C)
sudo apt install -y -V libarrow-dataset-dev # For Arrow Dataset C++
sudo apt install -y -V libarrow-flight-dev # For Flight C++
# Notes for Plasma related packages:
#   * You need to enable "non-free" component on Debian GNU/Linux
#   * You need to enable "multiverse" component on Ubuntu
#   * You can use Plasma related packages only on amd64
sudo apt install -y -V libplasma-dev # For Plasma C++
sudo apt install -y -V libplasma-glib-dev # For Plasma GLib (C)
sudo apt install -y -V libgandiva-dev # For Gandiva C++
sudo apt install -y -V libgandiva-glib-dev # For Gandiva GLib (C)
sudo apt install -y -V libparquet-dev # For Apache Parquet C++
sudo apt install -y -V libparquet-glib-dev # For Apache Parquet GLib (C)

R -e "install.packages('arrow')"