Skip to content

Installation Amazon Linux AMI (EC2)

cam-intel edited this page Jun 15, 2011 · 14 revisions

The Amazon Linux AMI comes with old packages, e.g., Cairo 1.8.8. Here's one way to get node-canvas up and running from source.

Remove the old package:

$ sudo yum erase cairo

Set up some env vars:

export PKG_CONFIG_PATH='/usr/local/lib/pkgconfig'  
export LD_LIBRARY_PATH='/usr/local/lib':$LD_LIBRARY_PATH  

Get & build various source packages:

$ 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  

Do the same for these two:

Now npm install canvas should build & run just fine.