in 11.04 cairo can be installed through pecl
sudo apt-get install php-pear
sudo pecl install cairo-0.2.0