Minor Issue with Perl 6 Install on CentOS 6
I had a little hiccup while installing Perl 6 on a CentOS system, and thought I'd leave the details here in case it happens to anyone else.
[Update: This has already been fixed by one of the Perl 6 devs, who isn't able to login here to comment. Panda installs without needing lsb_release. So my kludge is no longer needed.]
I used rakudobrew, and installed rakudo with moar just fine. But "rakudobrew build-panda"
failed with "Unable to execute 'lsb_release -a 2> /dev/null'"
. That lsb_release
program wasn't installed on this system, but yum said I could get it from the package redhat-lsb-core. Unfortunately, when I tried to install that, it came up with a list of dozens of dependencies to go with it, including a lot of X stuff like ghostscript and libGL, even some sound packages.
This is a lightweight headless system, and it needs to stay that way, so I didn't want to install all that stuff just to get this one little utility. So I did a little research and found out what it would probably report, and created my own lsb_release that would provide what rakudo needed to see:
#!/bin/sh
echo Distribution ID: CentOS
echo "Description: CentOS release 6.6 (Final)"
echo Release: 6.6
I created that in my ~/bin directory (which is in my $PATH), chmod'd the permissions to 755, and ran the build-panda again. Problem solved!
So if you found this page because you're having the same problem, you might give that a try. Look in /etc/*-release to see what the Description should be, and pluck the Release out of that. Or if you're working with some other Linux distro that doesn't have lsb_release or those files, look around in /etc to see what you can find, or look through the output of dmesg
. I don't know exactly what rakudo needs the info for, or how accurate it needs to be, but it needs to be in that format.
I think it's used to populate $*OS and $*DISTRO which tells you the OS and version you are on.
https://github.com/rakudo/rakudo/search?q=lsb_release
That makes sense. I guess the right thing to do would be to offer a patch to have it check those /etc/*release files for the info if lsb_release doesn't work.