Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Issue with ActivePerl installation on Fedora 20

by as00060 (Novice)
on Sep 20, 2015 at 07:04 UTC ( [id://1142540]=perlquestion: print w/replies, xml ) Need Help??

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

Hello All,

First, I find it very surprising that after the installation of Fedora OS, I couldn't find Perl on it, when I fire the command "perl -v", it returns " command not found". So, really not sure if I have done any mistake, as the OS installation was successful with no errors, I have given 22 GB disk space to the OS in my Oracle VirtualBox.

Second, I downloaded the ActivePerl-5.20.2.2002-x86_64-linux-glibc-2.15-299195.tar from perl.org. extracted it, and fired the command

# tar -xvf ActivePerl-5.20.2.2002-x86_64-linux-glibc-2.15-299195.tar

It went fine, then I fired the command

# ./install.sh

There was some interactive questions including "Enter top level directory for install? [/opt/ActivePerl-5.20]"

Since I wanted to install/configure the Perl under following path

/opt/perl/ActivePerl-5.20

So, I have given the path, and hit enter, it progressed without any flaws, and installation was success, and I got the following directories.files in the above path.

[root@fedora ActivePerl-5.20]# ll total 24 drwxr-xr-x. 2 root root 4096 Jul 19 14:44 bin drwxrwxr-x. 2 root root 4096 Sep 20 02:13 etc drwxr-xr-x. 8 root root 4096 Sep 20 02:13 html drwxr-xr-x. 101 root root 4096 Jul 19 14:44 lib drwxr-xr-x. 4 root root 4096 Jul 19 12:45 man drwxr-xr-x. 3 root root 4096 Jul 19 12:44 site

I then went to .bash_profile, and set the env variable as

PATH=/opt/perl/ActivePerl-5.20

However,I could see the following path already mentioned in the above path

PATH=$PATH:$HOME/bin

I had commented the path before I put mine .

Size to /opt is 4 GB.

Replies are listed 'Best First'.
Re: Issue with ActivePerl installation on Fedora 20
by Corion (Patriarch) on Sep 20, 2015 at 07:12 UTC

    So, where exactly is your problem?

    Does the following command work?

    /opt/perl/ActivePerl-5.20/bin/perl -v

    Most likely, you want to add the following line to your ~/.bashrc:

    export PATH=$PATH:/opt/perl/ActivePerl-5.20/bin

    YOu might also want to investigate how to install the vendor-packaged Perl for your OS. Maybe yum perl installs the vendor packaged Perl package.

      Q) Does the following command work? /opt/perl/ActivePerl-5.20/bin/perl -v >> yes , it does. Q)Most likely, you want to add the following line to your ~/.bashrc: export PATH=$PATH:/opt/perl/ActivePerl-5.20/bin >> As I have mentioned earlier, I have already set the path, may not be with your suggested method though. My concern is that, in the given scenario, if I have to execute any perl program, I will have to mention entire path of the perl, I just want to avoid this limitation. e.g. if I execute "perl <xyz.pl>" from the location of the program "perl -v" from any location neither of them would work, for both the scenario, I will have to mention full path to perl,whereas this shouldn't be happening. If this issue could be resolved, I am good to go.
        I have already set the path

        If you still need to invoke perl by specifying the entire path, then you haven't set the path correctly.
        (Once it's set correctly you won't need to specify the full path and you'll be able to invoke perl as simply perl)

        Cheers,
        Rob
Re: Issue with ActivePerl installation on Fedora 20
by RichardK (Parson) on Sep 20, 2015 at 10:44 UTC

    Fedora has perl & lots of perl modules in it's repository, just install it with your favourite package manager.

    BTW -- if you want to install it from the command line, fedora 22 has replaced yum with dnf.

Re: Issue with ActivePerl installation on Fedora 20
by flexvault (Monsignor) on Sep 20, 2015 at 18:56 UTC

    Hello as00060,

    I stopped using Fedora more than 10 years ago, but did you look in '/usr/local/bin' directory? If you see links in that directory to other programs, you should be able to add the following:

    ln -s /opt/perl/ActivePerl-5.20/bin/perl myperl # use whatever nam +e you want
    Then when you type 'myperl' on the command line it should use the Active Perl command you installed.

    That should work no matter what account you're 'login'ed under.

    Good Luck...Ed

    "Well done is better than well said." - Benjamin Franklin

      Hi, I was missing on the soft link part. @Ed, your suggestion worked for me thanks a ton. We can now conclude the discussion. Thanks to all for your time. Regards, Amitesh
Re: Issue with ActivePerl installation on Fedora 20
by u65 (Chaplain) on Sep 20, 2015 at 10:30 UTC

    And it would help readers of your post to break up that mass of words into paragraphs and blocks of code.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1142540]
Approved by kevbot
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2024-04-16 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found