I'm setting up an AirPi using these instructions, but I get an error when I try and start shairport:

pi@raspberrypi ~/shairport $ ./shairport.pl -a AirPi
Can't locate Net/SDP.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at ./shairport.pl line 48.
BEGIN failed--compilation aborted at ./shairport.pl line 48.

I read up that cpan install Net::SDP should fix the problem, but now I get:

pi@raspberrypi ~/shairport $ sudo su
root@raspberrypi:/home/pi/shairport# cpan install Net::SDP
Going to read '/root/.cpan/Metadata'
  Database was generated on Tue, 05 Mar 2013 23:41:02 GMT
Running install for module 'Net::SDP'
Running make for N/NJ/NJH/Net-SDP-0.07.tar.gz
Checksum for /root/.cpan/sources/authors/id/N/NJ/NJH/Net-SDP-0.07.tar.gz ok
Uncompressed /root/.cpan/sources/authors/id/N/NJ/NJH/Net-SDP-0.07.tar.gz successfully
Using Tar:/bin/tar xf "Net-SDP-0.07.tar":
Couldn't untar Net-SDP-0.07.tar
Package seems to come without Makefile.PL.
  (The test -f "/root/.cpan/build/NJH-yfX4Kv/Makefile.PL" returned false.)
  Writing one on our own (setting NAME to NetSDP)
  Had problems unarchiving. Please build manually
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install

I tried going to /root/.cpan/sources/authors/id/N/NJ/NJH/ and I could manually untar the file, but it didn't seem to help when I re-ran the command.

I looked in /root/.cpan/build/NJH-yfX4Kv/ and I did find a Makefile.PL, and a tarball, and nothing else. Strange. This was the auto-generated one.

I'm stuck. What can I do now?

up vote 3 down vote accepted

I couldn't install it via CPAN either. I guess the package is broken. I instead used this github mirror: https://github.com/njh/perl-net-sdp

Just git clone it and follow the installation instructions.

After the cpan install fails, go to the directory where the tar ball is (/root/.cpan/...) and untar by hand. Then cd into that directory and build by hand

perl Build.PL

./Build

./Build test

./Build install

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.