Compile and install perl (5.16.1) in CentOS)

Source: Internet
Author: User
Tags install perl

Compile and install perl (5.16.1) in CentOS)

First download the latest perl source code package:

[Root @ akinlau/] # wget http://www.cpan.org/src/5.0/perl-5.16.1.tar.gz

Decompress the source package
[Root @ akinlau/] # tar-xzf perl-5.16.1.tar.gz

Compile and install. The directory can be customized.

[Root @ akinlau/] # cd perl-5.16.1
[Root @ akinlau perl-5.16.1] #./Configure-des-Dprefix =/usr/local/perl

[Root @ akinlau perl-5.16.1] # make
[Root @ akinlau perl-5.16.1] # make test
[Root @ akinlau perl-5.16.1] # make install

If the system has previously installed the old version of perl, replace the original version of the system.
[Root @ akinlau perl-5.16.1] # mv/usr/bin/perl. bak
[Root @ akinlau perl-5.16.1] # ln-s/usr/local/perl/bin/perl/usr/bin/perl

Let's see if it's the latest version.

[Root @ akinlau perl-5.16.1] # perl-v

This is perl 5, version 16, subversion 1 (v5.16.1) built for x86_64-linux

Copyright 1987-2012, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, shocould be found on
This system using "man perl" or "perldoc perl". If you have access to
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

If the preceding information is displayed, the installation is successful.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.