configure: error: recommended PNG functions feature could not be enabled

安装node.js 的 node-canvas 程序的时候遇到报错,解决方法如下

$ sudo yum erase cairo 卸载cairo

$ curl http://www.cairographics.org/releases/pixman-0.22.0.tar.gz -o pixman.tar.gz  
$ tar -zxf pixman.tar.gz && cd pixman-0.22.0/  
$ ./configure --prefix=/usr/local   
$ make install  

下载
http://www.ijg.org/files/jpegsrc.v8c.tar.gz
http://cairographics.org/releases/cairo-1.10.2.tar.gz

安装目录统一为./configure --prefix=/usr/local

安装cairo的时候要转移
export PKG_CONFIG_PATH='/usr/local/lib/pkgconfig'  export LD_LIBRARY_PATH='/usr/local/lib':$LD_LIBRARY_PATH ./configure --prefix=/usr/local
make
make install

你可能感兴趣的:(configure: error: recommended PNG functions feature could not be enabled)