ubuntu 18.04 npm install 遇到的pngquant-bin 问题

Tania ·
更新时间:2024-09-20
· 763 次阅读

遇到的问题 npm install > pngquant-bin@4.0.0 postinstall /var/www/tax_client/node_modules/pngquant-bin > node lib/install.js ⚠ The `/var/www/tax_client/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly ⚠ pngquant pre-build test failed ℹ compiling from source ✔ pngquant pre-build test passed successfully ✖ Error: pngquant failed to build, make sure that libpng-dev is installedpngquant-bin at Promise.all.then.arr (/var/www/tax_client/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11) at at process._tickCallback (internal/process/next_tick.js:188:7) /var/www/tax_client ├─┬ babel-core@6.26.3 │ └── source-map@0.5.7 ├─┬ style-loader@0.13.2 │ └─┬ loader-utils@1.2.3 │ ├── big.js@5.2.2 │ └─┬ json5@1.0.1 │ └── minimist@1.2.0 └─┬ vue-loader@13.7.3 ├─┬ loader-utils@1.2.3 │ ├── big.js@5.2.2 │ └─┬ json5@1.0.1 │ └── minimist@1.2.0 └─┬ postcss-load-config@1.2.0 └─┬ cosmiconfig@2.2.2 └── minimist@1.2.0 npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9 npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9 npm WARN optional Skipping failed optional dependency /watchpack/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9 npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9 npm ERR! Linux 4.15.0-65-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script 'node lib/install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pngquant-bin package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node lib/install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pngquant-bin npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pngquant-bin npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /var/www/tax_client/npm-debug.log 解决方式 sudo apt-get install libpng-dev # 安装依赖的软件 npm install pngquant-bin # 覆盖4.00版本,升级倒5.02 npm install # 使用5.02 版本执行 #执行日志 > pngquant-bin@5.0.2 postinstall /var/www/tax_client/node_modules/pngquant-bin > node lib/install.js ✔ pngquant pre-build test passed successfully /var/www/tax_client └── pngquant-bin@5.0.2 extraneous npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9 npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9 npm WARN optional Skipping failed optional dependency /watchpack/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9 npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
作者:majinbo111



npm ubuntu install bin

需要 登录 后方可回复, 如果你还没有账号请 注册新账号
相关文章
Isoke 2020-03-25
852