I followed the instructions here https://github.com/LearnBoost/node-canvas/wiki/Installation---Amazon-Linux-AMI-%28EC2%29 to install the latest version of libcairo on my EC2 instance.
So I compiled everything, worked fine, my library is in /usr/local/lib.
However, when launching my Node app, I get
Error: libcairo.so.2: cannot open shared object file: No such file or directory.
libcairo.so.2 is under /usr/local/lib. I tried adding a few lines in my /root/.bashrc file:
export PKG_CONFIG_PATH='/usr/local/lib/pkgconfig' export LD_LIBRARY_PATH='/usr/local/lib':$LD_LIBRARY_PATH
Is there a variable or something I need to set so that my Node.js app knows where to find libcairo.so.2?