我正在尝试在Docker容器中安装mozjpeg,该容器运行
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.11.7
PRETTY_NAME="Alpine Linux v3.11"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"我得到了下面的错误
yarn install --frozen-lockfile
yarn install v1.19.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @typescript-eslint/eslint-plugin@2.31.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
warning " > @typescript-eslint/eslint-plugin-tslint@2.31.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
warning " > @typescript-eslint/parser@2.31.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
warning "serverless > @serverless/components > inquirer-autocomplete-prompt@1.4.0" has unmet peer dependency "inquirer@^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0".
warning " > serverless-plugin-aws-alerts@1.7.1" has incorrect peer dependency "serverless@^2.4.0".
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error /builds/conversion-handler/node_modules/mozjpeg: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /builds/conversion-handler/node_modules/mozjpeg
Output:
⚠ spawn /builds/conversion-handler/node_modules/mozjpeg/vendor/cjpeg ENOENT
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c ./configure --enable-static --disable-shared --disable-dependency-tracking --with-jpeg8 --prefix="/builds/conversion-handler/node_modules/mozjpeg/vendor" --bindir="/builds/conversion-handler/node_modules/mozjpeg/vendor" --libdir="/builds/conversion-handler/node_modules/mozjpeg/vendor"
configure: error: in `/tmp/5165e468-cf39-4de1-843a-506698a12de7':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... no
checking for cc... no
checking for cl.exe... no
at /builds/conversion-handler/node_modules/execa/index.js:231:11
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 0)在调用yarn install之前,我尝试运行- apk add automake autoconf libtool dpkg pkgconfig nasm libpng,但没有帮助。
请告诉我如何解决这个问题?
发布于 2021-11-11 02:58:13
还需要一些额外的包:
apk add --no-cache build-base git python util-linux \
vips-dev autoconf libtool dpkg pkgconfig nasm \
libpng autoconf automake libtool tiff jpeg \
zlib zlib-dev pkgconf nasm file我从comment here上得到了一些,我没有测试哪些是不需要的。;)
https://stackoverflow.com/questions/69515537
复制相似问题