我正在尝试安装mozjpeg
在运行的 Docker 容器中
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)
我试过跑步——apk add automake autoconf libtool dpkg pkgconfig nasm libpng
在打电话之前,yarn install
但这没有帮助。
请告知我该如何解决这个问题?