php - 在 CentOS 6 上安装 php-mcrypt

标签 php centos

我已经尝试安装 php-mcrypt 一段时间了。每次我得到“没有可用的包 php-mcrypt”。回到我身边。这是我尝试过的:

root@ip-********** [~]# yum install php-mcrypt --enablerepo=centosplus (<- both with and without this)
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: p3plmirror01.prod.phx3.secureserver.net
* centosplus: p3plmirror01.prod.phx3.secureserver.net
* epel: mirrors.solfo.com
* extras: p3plmirror01.prod.phx3.secureserver.net
* updates: p3plmirror01.prod.phx3.secureserver.net
centosplus                                               | 3.5 kB     00:00
centosplus/primary_db                                    | 746 kB     00:00
Setting up Install Process
No package php-mcrypt available.
Error: Nothing to do

我已确保安装 EPEL 存储库。在这一点上,我只是难住了。我遵循了我在网上找到的每一个教程并得到了同样的错误。

备注:GoDaddy VPS , CentOS 6.4 64 位,mcrypt 安装顺利,但没有 php-mcrypt。

最佳答案

我遇到了同样的问题,并且发现之前的建议给了我足够的信息来让它在我的服务器上运行。以下是我所做的:

1) 安装 EPEL 存储库(来自:http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x):

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

2) 通过以下方式安装:

yum update
yum install php-mcrypt*

yum update 更新了我服务器上的存储库引用,然后第二个命令得到了我需要的内容:)

3) 重新启动您的网络服务器。对于我的 apache 安装,我做了:

service httpd restart

关于php - 在 CentOS 6 上安装 php-mcrypt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17109818/

相关文章:

linux - 用户 Centos 8 Postgresql12 的身份验证失败

javascript - DataTable bSortable columnDefs 问题

javascript - 如何在 javascript 变量中设置 ckeditor html 数据

centos - 无法在 RedHat 上启动 dashDB Local

java - 如何通过 Java API 访问远程 Linux 机器

oracle - Centos7 node-oracle连接失败错误-错误: DPI-1047

php - MySQL 到 outfile 不能在 PHP 应用程序中工作,但可以在 mysql 中工作

php - jquery.post 不起作用

php - 如何过滤多个数据库表的查询结果

php - 将 imagick 安装到 azure