sudo apt-get install libfreetype6-dev
sudo apt-get install libavahi-gobject-dev
sudo apt-get install libSM-dev
sudo apt-get install libXrender-dev
sudo apt-get install libfontconfig-dev
sudo apt-get install libXext-dev
Edit: To get OpenGL to build I also had to install libgl1-mesa-dev and freeglut3-dev.
Edit2: Audio required libphonon-dev.
安装以上包后就可以正常使用了。