在 Alpine 上安装 crcmod CRC32C C 扩展
Install crcmod CRC32C C extension on Alpine
我正在尝试将我的 CI 构建迁移到基于 alpine 的 docker 图像。
构建的一部分是使用 gsutil
命令从 Firebase 测试实验室检索工件:
gsutil -m cp -r -U $BUCKET_DIR* $OUTPUT_DIR
此命令失败,因为它无法对下载的工件执行 CRC 检查:
CommandException:
Downloading this composite object requires integrity checking with CRC32c, but your crcmod installation isn't using the module's C extension, so the hash computation will likely throttle download performance. For help installing the extension, please see "gsutil help crcmod".
To download regardless of crcmod performance or to skip slow integrity checks, see the "check_hashes" option in your boto config file.
NOTE: It is strongly recommended that you not disable integrity checks.
Doing so could allow data corruption to go undetected during uploading/downloading.
CommandException: 1 file/object could not be transferred.
gsutil help crcmod
未提供有关如何在 Alpine 上安装 C 扩展的说明。
我已尝试安装以下软件包,虽然安装成功,但未安装 C 扩展,仍然导致 gsutil 命令失败并出现相同的错误。
apk add --update --no-cache python py-pip gcc python-dev
pip install -U crcmod
有什么线索吗?
很确定一定有更好的选择,但这是我的解决方法
# Install Alpine Python dependencies
apk add --update --no-cache python python-dev gcc musl-dev
# Compile CRC32c
# See for more information: https://cloud.google.com/storage/docs/gsutil/addlhelp/CRC32CandInstallingcrcmod
#
curl -L -o crcmod.tar.gz "https://downloads.sourceforge.net/project/crcmod/crcmod/crcmod-1.7/crcmod-1.7.tar.gz"
tar -xzf crcmod.tar.gz
cd crcmod-1.7/
python setup.py install
cd ..
这看起来像是 py-crcmod 包中的问题。有一些 .so 文件 (_crcfunext.so
),但可能由于某种原因它不起作用?请在 https://bugs.alpinelinux.org/projects/alpine/issues.
上打开一个问题
我正在尝试将我的 CI 构建迁移到基于 alpine 的 docker 图像。
构建的一部分是使用 gsutil
命令从 Firebase 测试实验室检索工件:
gsutil -m cp -r -U $BUCKET_DIR* $OUTPUT_DIR
此命令失败,因为它无法对下载的工件执行 CRC 检查:
CommandException:
Downloading this composite object requires integrity checking with CRC32c, but your crcmod installation isn't using the module's C extension, so the hash computation will likely throttle download performance. For help installing the extension, please see "gsutil help crcmod".
To download regardless of crcmod performance or to skip slow integrity checks, see the "check_hashes" option in your boto config file.
NOTE: It is strongly recommended that you not disable integrity checks.
Doing so could allow data corruption to go undetected during uploading/downloading.
CommandException: 1 file/object could not be transferred.
gsutil help crcmod
未提供有关如何在 Alpine 上安装 C 扩展的说明。
我已尝试安装以下软件包,虽然安装成功,但未安装 C 扩展,仍然导致 gsutil 命令失败并出现相同的错误。
apk add --update --no-cache python py-pip gcc python-dev
pip install -U crcmod
有什么线索吗?
很确定一定有更好的选择,但这是我的解决方法
# Install Alpine Python dependencies
apk add --update --no-cache python python-dev gcc musl-dev
# Compile CRC32c
# See for more information: https://cloud.google.com/storage/docs/gsutil/addlhelp/CRC32CandInstallingcrcmod
#
curl -L -o crcmod.tar.gz "https://downloads.sourceforge.net/project/crcmod/crcmod/crcmod-1.7/crcmod-1.7.tar.gz"
tar -xzf crcmod.tar.gz
cd crcmod-1.7/
python setup.py install
cd ..
这看起来像是 py-crcmod 包中的问题。有一些 .so 文件 (_crcfunext.so
),但可能由于某种原因它不起作用?请在 https://bugs.alpinelinux.org/projects/alpine/issues.