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

[doc] The Rakubrew cpanm non-root user installation process could be better documented

Open jeffgazso opened this issue 1 year ago • 0 comments

  • What's the output of rakubrew rakubrew-version?:
$ rakubrew rakubrew-version
rakubrew v37 Build type: cpan OS: linux
  • Are you using rakubrew in env or in shim mode? (run rakubrew mode to find out):
$ rakubrew mode
env
  • Where is rakubrew installed? (run rakubrew home to find out): $HOME/.rakubrew

I installed Rakubrew via $ cpanm App::Rakubrew as a non-root user. Unfortunately, the process was a bit bumpier than the CPAN section of the https://rakubrew.org/ site suggests. There were two bumps in the road:

  1. Rakubrew was installed to $HOME/perl5/bin/rakubrew and it wasn't initially in my path so I couldn't run $ rakubrew unqualified.
  2. Once that was fixed, Rakubrew complained Can't locate App/Rakubrew.pm in @INC.

The solution to the first issue was pretty obvious but the second issue took some time to figure out. If there is a better way to handle this let me know, but I was able to fix both issues by throwing the following in my .bashrc file:

export PATH="$HOME/perl5/bin/:$PATH"
if [ -d $HOME/perl5/lib/perl5 ]; then
	PERL5LIB=${PERL5LIB:+$PERL5LIB:}$HOME/perl5/lib/perl5
	MANPATH=${MANPATH:+$MANPATH:}$HOME/perl5/man
	export MANPATH PERL5LIB
fi

You may want to call this out in the documentation somewhere.

jeffgazso avatar Jul 18 '23 21:07 jeffgazso