首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装mozjpeg -mozjpeg/供应商/cjpeg ENOENT时出错

安装mozjpeg -mozjpeg/供应商/cjpeg ENOENT时出错
EN

Stack Overflow用户
提问于 2021-10-10 13:23:02
回答 1查看 108关注 0票数 0

我正在尝试在Docker容器中安装mozjpeg,该容器运行

代码语言:javascript
复制
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/"

我得到了下面的错误

代码语言:javascript
复制
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,但没有帮助。

请告诉我如何解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2021-11-11 02:58:13

还需要一些额外的包:

代码语言:javascript
复制
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上得到了一些,我没有测试哪些是不需要的。;)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69515537

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档