App-perlbrew icon indicating copy to clipboard operation
App-perlbrew copied to clipboard

Need to install Perlbrew in /opt/perl5

Open tommybutler opened this issue 1 year ago • 3 comments

What's the appropriate means of creating a perlbrew installation in /opt/perl5? I've attempted a few seemingly obvious methods without success (modifying init file export values), however perlbrew either defaults back to /home/myuser/perl5 or it deletes any user and system directories from $PATH.

What's the official, sanctioned way to install perlbrew and its subsequently compiled perls into /opt/perl5. I $work at a business where it is not permitted to automate processes as a human. Commands need to be run under a system account, and our perlbrew can't reside in my user home.

tommybutler avatar Feb 25 '25 16:02 tommybutler

I think you want export PERLBREW_ROOT=/opt/perl5

happy-barney avatar Feb 25 '25 19:02 happy-barney

I think you want export PERLBREW_ROOT=/opt/perl5

If we do this, perlbrew installs under /opt/perl5 but no perl installs will compile. We get an error saying ExtUtils::MakeMaker not found in @INC. It leads me to believe we've missed something or we're doing something wrong. What's the official perlbrew way to install outside of /home/$USER

tommybutler avatar Feb 26 '25 22:02 tommybutler

Is ExtUtils::MakeMaker installed?

According to https://metacpan.org/pod/App::perlbrew you do,

 export PERLBREW_ROOT=/opt/perl5
 curl -L https://install.perlbrew.pl/ | bash

and the perl that installs perlbrew has to be a non-perlbrew perl, which can be set with,

export PERLBREW_SYSTEM_PERL= whereever it is

drbean avatar Feb 28 '25 11:02 drbean