首页 > 其他分享 >mozjpeg进行压缩时失败

mozjpeg进行压缩时失败

时间:2022-09-24 19:14:48浏览次数:77  
标签:EOF 压缩 mozjpeg 博客 write 7.1 失败

参考链接:

npm安装包时报错npm ERR! Failed at the [email protected] postinstall script - 半亩方塘 (bluepost.cn)

(1条消息) mozjpeg 安装失败/Failed at the mozjpeg_imHere·的博客-CSDN博客_mozjpeg

npm install error 7.1.1 · Issue #67 · imagemin/mozjpeg-bin (github.com)

1.错误描述

在升级hexo的配置时,添加了压缩插件,但是出现了如下错误。

在具体分析时发现,并不是所有的图片都不能被压缩,而是只有部分图片不能被压缩。

FATAL {
  err: Error: write EOF
      at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {
    errno: -4095,
    code: 'EOF',
    syscall: 'write',
    originalMessage: 'write EOF',
    shortMessage: 'Command failed with EOF: D:\\workspace\\myBlog\\node_modules\\[email protected]@mozjpeg\\vendor\\cjpeg.exe -baseline\n' +
      'write EOF',
    command: 'D:\\workspace\\myBlog\\node_modules\\[email protected]@mozjpeg\\vendor\\cjpeg.exe -baseline',
    exitCode: undefined,
    signal: undefined,
    signalDescription: undefined,
    stdout: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff e1 10 b2 45 78 69 66 00 00 4d 4d 00 2a 00 00 00 08 00 02 87 69 00 04 00 00 00 01 00 00 ... 58228 more bytes>,
    stderr: <Buffer >,
    failed: true,
    timedOut: false,
    isCanceled: false,
    killed: false
  }
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

2.解决方法

(1条消息) mozjpeg 安装失败/Failed at the mozjpeg_imHere·的博客-CSDN博客_mozjpeg

无效,不过提供了hosts文件的模板。

npm install error 7.1.1 · Issue #67 · imagemin/mozjpeg-bin (github.com)

无效

(1条消息) mozjpeg上构建失败_高级盘丝洞的博客-CSDN博客

无效

在仔细检查时发现,jpeg文件不能被压缩。出现问题的图片如下所示:

4

最后将图片删除成功解决问题。

3.总结

最好使用png和jpg的图片格式,其他格式的图片很容易出现压缩问题。

标签:EOF,压缩,mozjpeg,博客,write,7.1,失败
From: https://www.cnblogs.com/zuiyixin/p/16726277.html

相关文章

  • unity hub 个人版许可证获取失败
    个人版许可证获取失败,项目都没法打开。可以退出再次登录,或重启电脑,操蛋事,找了半天证书,博文说删c盘文件,找都找不到https://developer.unity.cn/ask/question/62297ed9ed......
  • 基于扩散模型的图像压缩:创建基于Stable Diffusion的有损压缩编解码器
    StableDiffusion是最近在图像生成领域大火的模型,在对他研究的时候我发现它可以作为非常强大的有损图像压缩编解码器。在介绍之前,我们先看看它与高压缩率下的JPG和WebP相比......
  • linux 启动mysql失败 InnoDB: Table flags are 0 in the data dictionary but the fla
    linux启动mysql失败,报错日志文件里的报错信息InnoDB:Tableflagsare0inthedatadictionarybuttheflagsinfile./ibdata1are0x4800!执行 sudosystemctl......
  • maven 导出资源流失败问题
    在pom.xml中配置以下代码解决导出问题(解决办法来自狂神)<!--配置maven静态资源过滤问题--><build><resources><resource><dir......
  • django csrf 验证失败
    转载自: python-requests和django-CSRF验证失败。请求中止-IT宝库(itbaoku.cn)python-requests和django-CSRF验证失败。请求中止的处理方法问题描述 我......
  • Windows server + nginx + jemeter压测大量请求失败
    大规模Windows环境下,采用Nginx反向代理服务后,操作系统会产生较多TIME_WAIT的TCP(TransmissionControlProtocol)连接,操作系统默认TIME_WAIT的TCP连接回收时间是4分钟,TCP默认......
  • Linux查看文件内容和压缩文件命令
    查看文件内容一些重要的目录:/usr/share/    帮助文档、说明文档/var/log/      日志/var/run/      运行中程序/var/tmp      临时文件根(/......
  • 出现yarn启动项目失败
    $yarnrunserveyarnrunv1.22.19$vue-cli-serviceserve'vue-cli-service'不是内部或外部命令,也不是可运行的程序或批处理文件。errorCommandfailedwithexit......
  • windows server 2016 安装IIS失败
    windowsserver2016默认是不安装.netframework3.5的,可以在添加删除程序中单独添加。但是有时候系统安装文件不在的时候,找不到安装程序就不能安装成功。这时候单独下载dot......
  • 安装eslint后可能因为eslint版本过高导致axios安装失败
    安装eslint后可能因为eslint版本过高导致axios安装失败,也就是包冲突有两个命令可以解决此问题一是--force无视冲突,强制获取远端npm库资源(覆盖之前)二是--legacy-pee......