SlimStuff Home Squeezebox Server Plugins Plugins Forum

Perl 5.10 on SME7 (and very likely other CentOS 4 based systems too)

The SME 7.x linux distribution is based on CentOS 4. It uses Perl 5.8.5, which has some bugs which can lead Squeezebox Server to crash. Now that Squeezebox Server 7.4.x requires Perl 5.8.8, this won't work any more. Perl 5.10 is recommended. As SME administration is heavily based on lots of Perl scripts you wouldn't just update the existing Perl - it might break the server's functionality.

 

Download perl510.tgz (~10.5MB)


I compiled this Perl installation on a SME 7.3 machine. It might work with other Linux distributions as well. Use it at your own risk!

Here we go, the few rather simple steps to get the best Squeezebox Server experience on SME 7:

  • make a backup of your system (just so you can't blame me for messing it up - though we should not touch anything of the existing system)
  • make sure the backup worked successfully ;-)
  • make sure you don't already have a folder in /usr/local/perl510
  • download the tarball from http://www.herger.net/slim/perl510.tgz
     
  • login to your machine as root
  • copy the tarball to /usr/local/
  • run the following commands:
    cd /usr/local/
    tar -xzf perl510.tgz
    /usr/local/perl510/bin/perl5.10.0 -v
  • this should give you something like
    This is perl, v5.10.0 built for i386-linux
    [..]
  • if you're fine so far, you should link the binaries and libraries for easier access:
    ln -s /usr/local/perl510/bin/perl5.10.0 /usr/local/bin/
    ln -s /usr/share/squeezeboxserver/CPAN/ /usr/libexec/CPAN
    
  • now we'll test if Squeezebox Server is running:
    service squeezeboxserver stop
    cd /usr/libexec
    /usr/local/bin/perl5.10.0 squeezeboxserver
  • if you're still fine, we'll do the manual change you'll have to do after every update of Squeezebox Server. Apply the following changes to the three files:
    Index: /usr/lib/perl5/vendor_perl/Slim/bootstrap.pm
    ====================================================
    --- /usr/lib/perl5/vendor_perl/Slim/bootstrap.pm	(revision 29510)
    +++ /usr/lib/perl5/vendor_perl/Slim/bootstrap.pm	(working copy)
    @@ -140,6 +140,7 @@
     		$libPath,
     	);
     
    +         @INC = grep { $_ !~ /5.8/ } @INC;
    
     	$d_startup && printf("Got @INC containing:", @INC));
     
    
    Index: /usr/libexec/squeezeboxserver
    ====================================================
    --- /usr/libexec/squeezeboxserver	(revision 29510)
    +++ /usr/libexec/squeezeboxserver	(working copy)
    @@ -1,4 +1,4 @@
    -#!/usr/bin/perl -w
    +#!/usr/bin/perl5.10.0 -w
     
    
    Index: /usr/libexec/squeezeboxserver-scanner
    ====================================================
    --- /usr/libexec/squeezeboxserver-scanner	(revision 29510)
    +++ /usr/libexec/squeezeboxserver-scanner	(working copy)
    @@ -1,4 +1,4 @@
    -#!/usr/bin/perl -w
    +#!/usr/bin/perl5.10.0 -w
    

     
  • then comes the big moment:
    /etc/init.d/squeezeboxserver restart

If all that stuff does not work for you, simply remove the /usr/local/perl510 folder and the links in /usr/local/bin.

Good luck!

And many thanks to Mark Leman from the SME/Squeezebox community for the testing and improvement!
« back

Wikipedia Affiliate Button

   © 2003-2011 -