pngquant pre-build test failed

在安装layaair2-cmd的过程中,报了一个错。

pngquant pre-build test failed.

Error:pngquant failed to build,make sure that libpng-dev is installed.

不得不说,Error信息让我走了弯路,找了好久的libpng-dev这个库。

折腾了半天都不行,找到了pngquant库的github主页,在readme底部发现了一句话。

Make sure you have node.js and npm installed, and that the pngquant binary is in your PATH,

瞬间搞定了这个问题,解决方案如下:

1、前往https://pngquant.org/下载pngquant库

2、在计算机环境变量中添加 pngquant库目录

3、再次安装npm pngquant即可。


总的来说,如果上面的报错信息写成

Error:pngquant failed to build,Make sure you have node.js and npm installed, and that the pngquant binary is in your PATH。

就不会有这个坑了。

你可能感兴趣的:(pngquant pre-build test failed)