Monthly Archives: December 2012

AirPlay – With Shairport on my RaspberryPi

In today’s posting I want to share my experience setting up Shairport on my RaspberryPi. As I am by far not the first one describing this process I want to focus on the one step that didn’t work out immediately (missing Perl module). If you are not familiar with AirPlay have a look at Apples official site (Airplay @ Apple Site) or have a look at the Wikipedia site (Airplay @ Wikipedia. This tutorial is again based on Debian Wheezy (2012-10-28-wheezy-raspbian.img from the official RaspberryPi website)

First, set the audio output to the 3.5mm audio jack that comes with your RaspberryPi. If you own an USB sound device feel free to use that.

amixer cset numid=3 1

Change the last digit to 2 for HDMI or 0 for automatic.

Shairport has a few dependencies you have to resolve before you can install it.
Use the following command to install them:

apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils

After that, clone the Shairport git repository to you local disk

git clone shairport

Change to the newly created directory and start the make process

make; make install

Afterwards execute the newly created Perl script


After a few seconds you might see a Perl error similar to “Can not find”. If that happens open cpan.
If this is the first time – after a fresh installation – you enter cpan it will probably start to update itself to the latest version.
After the update process has finished, reload cpan and install NET::SDP by entering:

install NET::SDP

If you want to start Shairport automatically after booting your RaspberryPi – feel free to use the init script located in the Shairport directory.