How to install mcrypt using yum in CentOS6

Source: Internet
Author: User
Tags install php mcrypt centos yum repolist

When the yum installation prompts that the module cannot be found. The execution process is as follows:

[Root @ ptr228 ~] # Yum install php-mcrypt
Setting up Install Process
No package php-mcrypt available.
Error: Nothing to do

Originally, the official CentOS does not support the mcrypt module by default. Therefore, you must try another solution after two hours. Here, we mainly use the Ora Extension Library, EPEL (Extra Packages for Enterprise Linux) the solution is as follows:

Step 1: Find the rpm package in the extension Library
Open URL: http://mirrors.sohu.com/fedora-epel/6/i386/ use Ctrl + F search keyword "epel-release" find the latest extension package found latest version: epel-release-6-7.noarch.rpm

Take the following screenshot:

Then run the following command:

[Root @ ptr228 ~] # Rpm-ivh http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-7.noarch.rpm

See the figure below:

Note:: The extension package must be updated constantly, so you need to search for "epel-release" to find the correct version. Otherwise, the command cannot be executed successfully.

Step 2: execute the command: yum update. For more information about the system, see the following figure:
Run the following command:

[Root @ ptr228 ~] # Yum update

Then wait for a while, because the system will update to the latest CentOS version, which may take a long time. After the update is Complete, there will be Complete! Prompt

See the figure below:

Step 3: run the command yum repolist to view the installation result
Check whether the EPEL (Extra Packages for Enterprise Linux) extension package is available. The command and result are as follows:

Run the following command:

[Root @ ptr228 ~] # Yum repolist

See the figure below:

If you findEpelIt indicates that the installation is successful and you can continue to execute it.

Step 4: execute the command: yum install php-mcrypt to install the mcrypt extension package
Run the following command:

[Root @ ptr228 ~] # Yum install php-mcrypt
See the figure below:

 

You can see that the installation is ready. Enter y to continue the installation.

Step 5: restart apache to make the extension take effect
Run the following command:

[Root @ ptr228 ~] # Service httpd restart
See the figure below:

 

Open againPHPMyadminThe red error message is no longer displayed.

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.