in reply to Re: cpanminus installing but not working
in thread cpanminus installing but not working
Sorry if I seem a bit air headed. I'm still learning.
There's a lot of back story to this but putting it simply, I'm running Linux Fedora 20 on a bootable USB stick but I've ecountered the same problems(and more problems) on Vista and Win7 with Strawberry.
system Perl was not with the bootable OS so I installed it with sudo yum install perl.
As per your suggestion I looked into the $PATH enviroment variable. After installing Perl the perl and perldoc commands worked without /usr/bin/perl being a part of the enviroment variable. I assume those codes worked because even though Shebang line of my programs would validly be #!/usr/bin/perl the perl part of the code isnt a directory so since the $PATH enviroment variable included /usr/bin the bash commands worked.I've started rambling on. I'm going to study up more on PATH and enviroment to see if I can fix this. Thanks for the tip. I added /usr/bin/perl to the PATH variable but of course that did nothing. My current $PATH is as follows.
[root@localhost ~]# echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/IrishMonk +/.local/bin:/home/IrishMonk/bin:/usr/bin/perl
If I type perl -v the output looks like this
[root@localhost ~]# perl -v This is perl 5, version 18, subversion 2 (v5.18.2) built for i386-linu +x-thread-multi (with 18 registered patches, see perl -V for more detail) Copyright 1987-2013, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: cpanminus installing but not working
by taint (Chaplain) on May 27, 2014 at 04:59 UTC | |
We've all been there, at one time (new to OS, or Perl). INMHO, you made the right choice picking a *NIX OS, over Win$. Well, as to the command I should have noted that it was CaSe SeNsiTiVe. Meaning -V isn't the same as -v as it appears you used. No matter. You've given enough clues to help get things on the right track. Normally, for a situation/environment like the one you're using. Perl users often pick PerlBrew. However, it isn't the only choice, and many times, isn't the best. Besides, at this point, it would probably only serve to overwhelm you. What you're going to need to do first off. Is to somehow prepend your $PATH with your $HOME directory. Often your shell -- bash, in your case, rc file.
For example. On the box I'm writing this to you from; I'm running csh, on FreeBSD. So, for me, all of my Shell Environment settings are located in ~/.cshrc. The tilde slash (~/) is a shell shortcut for your $HOME folder/directory. According to the man pages for bash (link above). You'll need to edit ~/.bashrc, adjusting your $PATH accordingly. Perhaps pre-pending $HOME to the list of directories, rather than Appending, as in the path statement I listed, from my own. There are other "tricks" that can be employed, where Perl is concerned. But in all honesty. What you appear to be trying to do, is going to be a great deal more work, than I think you want to attempt. If it were just $HOME, it wouldn't be too bad. As many users face this situation, and as a result, thare many possible solutions available. But your use of a "thumb drive"/"USB stick" I think possibly complicates matters, more than usual -- more information needed. Top of the evenin' to you. --Chris ¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH | [reply] [d/l] [select] |
by IrishMonk (Initiate) on May 27, 2014 at 05:54 UTC | |
I've installed perlbrew with great difficulty before but it didn't work at all. I think I'm taking on too many complicated problems in the beginning of learning Perl. I'm just going to go into college, download an old version of Linux with system Perl. Use default configurations for cpan, and see where I go from there with getting cpanminus to work. Will keep in touch. Hopefully this will solve all these problems. | [reply] |
|
Re^3: cpanminus installing but not working
by taint (Chaplain) on May 27, 2014 at 05:09 UTC | |
The part that strikes me as odd is: I have no idea what .local/bin translates to. "dot files" have special meaning on *NIX OS's, and it'd be rare to intentionally use "dot folders". Any chance you have your USB stick mounted as .local? --Chris ¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH | [reply] [d/l] [select] |
by IrishMonk (Initiate) on May 27, 2014 at 05:53 UTC | |
I think the dot means that it's normally a hidden file/folder. The USB stick is seen as the hard drive with the location being / as in root. The computers actual hard drive can be mounted or unmounted like an external storage device. I'm going to try a different approach to solve this problem. I'll start from scratch with an old version of Linux with system Perl included. I'll re-post here to let you know how I get on. | [reply] |
by taint (Chaplain) on May 27, 2014 at 06:07 UTC | |
Best of luck you, in your new endeavours! --Chris ¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH | [reply] |
|
Re^3: cpanminus installing but not working
by wjw (Priest) on May 27, 2014 at 04:05 UTC | |
Just out of curiosity, what do you get when you do a 'locate cpanm' ? (sort of assuming Fedora has locate, but it has been 10 years since I touched anything RH-like). ...the majority is always wrong, and always the last to know about it... Insanity: Doing the same thing over and over again and expecting different results... A solution is nothing more than a clearly stated problem...otherwise, the problem is not a problem, it is a facct | [reply] |
by IrishMonk (Initiate) on May 27, 2014 at 04:46 UTC | |
That gave me quite a bit of information. Not that I know what any of it means for me
| [reply] [d/l] |
by wjw (Priest) on May 27, 2014 at 05:25 UTC | |
If you cd to '/home/IrishMonk/perl5/bin/' and then enter './cpanm' (no quotes) what happens? (might check that file to make sure permissions are workable too...just in case.) Update: What I am getting at is what taint is talking about below. Your $PATH is not set up to recognize the location that cpanm landed in. Am willing to bet his solution will get you going... ...the majority is always wrong, and always the last to know about it... Insanity: Doing the same thing over and over again and expecting different results... A solution is nothing more than a clearly stated problem...otherwise, the problem is not a problem, it is a facct | [reply] |
by taint (Chaplain) on May 27, 2014 at 05:53 UTC | |
by IrishMonk (Initiate) on May 27, 2014 at 06:25 UTC | |
by wjw (Priest) on May 27, 2014 at 06:19 UTC | |