When I install Perl 5.30.0 from source, perl -v still displays 5.26.2 is being used

0

I'm using Linux, and wanted to install the latest version of Perl, as according to the perl -v command, I had version 5.26.2, and the latest (stable) release is 5.30.0. But when I compiled the source, perl -v still returned 5.26.2! Why did this happen?

Here's what I did:

I acquired a copy of the Perl source from this site, unpacked it, and followed the installation instructions specified in README (the plain one, not any of the ones with .os at the end:)

./Configure -des -Dprefix=$HOME/localperl
make
make test
make install

I then ran perl -v to determine whether it worked, and it returned that I still had v5.26.2.

Blue-Maned Hawk

Posted 2019-06-10T22:29:12.690

Reputation: 347

You might find better answers at unix.stackexchange.com – Christopher Hostage – 2019-06-10T22:42:43.403

Maybe there are two perl executables on your path. Try type -a perl to see. – Ken Jackson – 2019-06-10T22:46:12.470

@KenJackson, what you suggested returned perl is /usr/bin/perl. I'm not sure what this means. – Blue-Maned Hawk – 2019-06-10T22:56:23.900

That's the version that's running, @Blue-Maned Hawk, not the one you compiled in your home directory. Put this in your ~/.bashrc file: PATH="$HOME/localperl/bin:$PATH" and execute it: . $/.bashrc. (That's the directory your compiled perl is in, isn't it?) – Ken Jackson – 2019-06-11T00:07:25.590

I'll try that, and comment again if it works. Any particular place? – Blue-Maned Hawk – 2019-06-11T01:33:14.003

I added that line to the file, @KenJackson, but the command you suggested, .$/.bashrc failed to work. Did you mean ./.bashrc? – Blue-Maned Hawk – 2019-06-11T01:44:07.983

That $ was supposed to be a ~. It doesn't allow me to edit it. – Ken Jackson – 2019-06-11T19:09:23.313

Nevermind. I fixed it by removing everything after -de. – Blue-Maned Hawk – 2019-06-11T23:04:19.393

No answers