I was following the rpi-setup-guide and the 'Installation' section of the xy-server readme but still got the following error:
No package 'cairo' found.
No package 'cairo' found
Doing this worked: sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev
sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev