Centos7 install Perl dependent Environment Library

Source: Internet
Author: User
Tags install perl
Perl Introduction

Perl is a computer programming language with rich functions. It runs on more than 100 computer platforms and is widely used, from mainframe to portable devices, from rapid prototyping to large-scale scalable development. Perl was first designed by Larry Wall in December 18, 1987. The current version is Perl 6, which was updated on July 6, December 25, 2015. Perl uses the features of C, sed, awk, shell scripting language, and many other programming languages. The most important feature is that it integrates the regular expression function, and a huge third-party code library CPAN. In short, Perl is as powerful as C and as convenient as awk, sed, and other script description languages, known by PERL language enthusiasts as "a fantastic scripting language with various language functions" and "trump card tools in Unix ". Perl is generally referred to as the "Practical Extraction and report language". You may also see that "Perl" contains lowercase letters. In general, "Perl" has upper-case P, which refers to the language itself, while "Perl", lower-case P, refers to the interpreter for running the program.

Lab Environment

System Version: centos7x3.10.0-514. el7.x86 _ 64

Perl: perl-5.16.1

Disable firewall and disable auto-start

Systemctl stop firewalld. Service
Systemctl disable firewalld

Disable SELinux

Sed-I's/SELinux = enforcing/SELinux = disabled/G'/etc/sysconfig/SELinux

Restart reboot

Reasons for installing Perl

Some children's shoes may not understand how to install it. in Linux, this is an integrated environment for various command versions and software dependent libraries, to put it bluntly, most or even all of its commands cannot be used. For various software installations, the compiling environment reports an error similar to: Error while loading shared libraries:/usr/lib64/perl5/CORE/libperl. so: file too short or when using some commands, the system prompts that the Perl version is too low. The above two types of errors are reported because the system's built-in Perl version is too low, so you need to manually upgrade it!

Install perl1 and uninstall the built-in Perl

Yum remove Perl

2. Install the Perl dependency package

Yum-y install CPAN

Note: This package is used to compile and install Perl.

3. Download the Perl source code package

Wget http://www.cpan.org/src/5.0/perl-5.16.1.tar.gz

4. decompress the Perl compressed package

Tar zxf perl-5.16.1.tar.gz

5. Go to the Perl decompression directory.

CD perl-5.16.1

6. Compile and install Perl (four steps in total). 1. Configure the Perl installation directory.

./Configure-des-dprefix =/usr/bin/perl

Note: The preceding command directories can be customized. You can specify the directories as needed.

2) Compile Perl

Make

3) Compile and test Perl

Make Test

4) install Perl

Make install

5) view the Perl version

Perl-V

Note: the installation is successful! If the installation of Perl is incorrect due to software compilation and installation, you must re-use Yum or compile and install the software after installing the new version of Perl. The reason is that when you uninstall the built-in Perl system, by default, the dependent package, environment package, and uninstalled software are cleared, so you need to reinstall it!

Centos7 install Perl dependent Environment Library

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.