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.