Skip to content

Instantly share code, notes, and snippets.

@Stray
Created August 11, 2012 11:10
Show Gist options
  • Save Stray/3323856 to your computer and use it in GitHub Desktop.
Save Stray/3323856 to your computer and use it in GitHub Desktop.
Node Canvas install procedure for Mac OS X 10.6.8
# This has been modified from https://github.com/LearnBoost/node-canvas/wiki/Installation---OSX
# I found that the official instructions caused errors relating to the non-existence of libpng
# Worked on MacbookPro5,1 and OS X 10.6.8
cd /usr
ls
# Check there is an entry called X11 - if not, X11 needs to be installed from disk before proceeding.
cd ~
mkdir BuildCairo
cd BuildCairo
curl http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz -o pkgconfig.tgz
tar -zxf pkgconfig.tgz && cd pkg-config-0.23
./configure
sudo make install
cd ..
curl http://www.cairographics.org/releases/pixman-0.20.0.tar.gz -o pixman.tar.gz
tar -zxf pixman.tar.gz && cd pixman-0.20.0/
./configure --prefix=/usr/local --disable-dependency-tracking
sudo make install
cd ..
curl ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.50.tar.gz -o libpng.tgz
tar -xzf libpng.tgz
mv libpng-* libpng
cd libpng
./configure --prefix=/usr/local --disable-dependency-tracking
sudo make install
cd ..
curl http://cairographics.org/releases/cairo-1.10.0.tar.gz -o cairo.tar.gz
tar -zxf cairo.tar.gz && cd cairo-1.10.0
./configure --prefix=/usr/local --disable-dependency-tracking
sudo make install
sudo npm install canvas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment