hkdtam has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

My question in short is,

is it possible to install perlbrew without a /usr/bin/perl or /usr/local/bin/perl?

The longer story here,

I have a pfsense box that I would like to use perl with a non root user. So perlbrew seems to be a logical solution. I tried to \fetch -o- http://install.perlbrew.pl | sh and got the following error message  Need /usr/bin/perl or /usr/local/bin/perl to use sh. On the other hand, there are two packages in the system, squid and squid-guard, actually brought their own perl and friends. For example,

[support@example.com]/home/support/download: file /usr/pbi/squid-amd6 +4/local/bin/perl /usr/pbi/squid-amd64/local/bin/perl: ELF 64-bit LSB executable, x86-64 +, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-el +f.so.1, for FreeBSD 10.1, stripped

So I would like to know if it is possible to make use them for one time bootstrap of perlbrew?

Thanks in advance for the help.

Regards,

David.

Replies are listed 'Best First'.
Re: Installing perlbrew with a non-system perl
by ikegami (Patriarch) on May 12, 2016 at 14:09 UTC
    I'm not sure why it forces perl to be located at one of those paths. You can override it as follows and see what happens:
    \fetch -o- http://install.perlbrew.pl | perl -pe's/^PERL=\K.*/`which perl`/' | sh
      Thanks ikegami,

      As soon as I saw your `which` command I knew I didn't try hard enough on setting up the environment.  Moreover, my question and intention were actually thoughtless casue I don't have those gcc and friends on hand to proceed further. 

      And it is not a good practice to put these stuff on a network appliance style machine.  So I guess I will symlink the perl from squid and live with local::lib + pure perl modules.
Re: Installing perlbrew with a non-system perl
by stevieb (Canon) on May 12, 2016 at 12:52 UTC

    First thing that came to my mind, is to cheat ;) Try if this temporary symlink is enough to bootstrap up perlbrew:

    sudo ln -s /usr/pbi/squid-amd64/local/bin/perl /usr/bin/perl # install perlbrew sudo rm /usr/bin/perl
      Thanks stevieb,

      >> First thing that came to my mind, is to cheat ;)

      :-D Yeah I thought of doing the same but was trying to see if I can get by without exercising root's power.