I was installing the latest version of perl using brew on my Mac OSX and was then prompted by perl to use local::lib to create my own directory of Perl Packages downloaded from CPAN. Here is a history of my commands:
431 brew install perl
#recommended to do by brew
432 PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib
433 echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >> ~/.bash_profile
#executing recommendation
434 sudo PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib
436 echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >> ~/.bash_profile
437 perl program.pl
I then tried running my perl script, but got this error:
Can't locate getopts.pl in @INC
So I installed Getopt::Std, which replaced getopt.pl
sudo cpan> install Perl4::CoreLibs
Then the perl script worked fine. However, it only worked in the terminal where I did all the above installations. I then tried to call other environment variables like 'python' or 'open -a TextEdit ~/.bash_profile' to see if those could be executed, but I get:
-bash: command: command not found
I tried looking for the bash_profile file, and can't seem to find that anywhere, perhaps it was deleted when this new directory was made? When I try to look for the path variable I get this, just not sure how to interpret:
echo PATH=$PATH
PATH="/Users/miseq/perl5/bin${PATH:+:${PATH}}"; export PATH; PERL5LIB="/Users/miseq/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; PERL_LOCAL_LIB_ROOT="/Users/miseq/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; PERL_MB_OPT="--install_base \"/Users/miseq/perl5\""; export PERL_MB_OPT; PERL_MM_OPT="INSTALL_BASE=/Users/miseq/perl5"; export PERL_MM_OPT;
In addition, when I open a new terminal, I get this message:
-bash: perl: command not found
This leads me to believe that the perl installation I did is giving me this problem of not being able to call any environment variables from the shell. Any help with this?
Many Thanks
/Users/miseq/perl5/bin/perl
?