Installing Perl in a Linux environment is really easy, but the reason I recorded here is because after the installation, there has been a problem plagued me, that is, I set up the installation directory has always been not effective, I always thought that the installation did not succeed, but then I found that it is actually installed successfully, No more gossip, just record it.
First download the latest version of Perl from the official website, the official website address is as follows:
http://www.perl.org/
The latest version is perl-5.20.0, by the way, the reason I'm installing Perl is that Perl on my server is too low!
After the download decompression, run the command to install the following:
The code is as follows |
|
#./configure-des-dprefix=/usr/local/perl Parameter-dprefix specifies that the installation directory is/usr/local/perl #make #make Test #make Install |
Very smooth, no report any mistake, but when finished, I found that the/usr/local/perl directory did not generate!
In general, we install software through this specified installation directory parameters can be automatically generated directories, it is necessary to manually create a directory, OK, then manually create a directory, as follows:
mkdir Perl
Run all the above commands again, but strangely, there is no file in the Perl directory! There's nothing wrong with it!
Is the directory permissions problem, set the directory permissions: chmod 777 Perl
Run the installation again, the result is not a file!
Originally things to here, I have some despair, you said installation did not succeed, that newspaper a mistake also good ah, at least know is where the wrong, but now is wrong!
But I don't know how, try to run a/usr/local/bin/perl-v, the result, hey! It turns out to be the latest version number, which means I actually installed it!
And then run
The code is as follows |
|
sudo mv/usr/bin/perl/usr/bin/perl.orig Ln-s/usr/local/bin/perl/usr/bin/perl |
Finished, run Perl-v,ok again, show the latest version!