How do I install php-mcrypt on CentOS 7?

Linode Staff

In order to install php-mcrypt, you first need to install the epel-release repository:

yum install epel-release

Then, you'll be able to install php-mcrypt:

yum install php-mcrypt

5 Replies

Hi, I tried this but getting below error. Can please help me on this

Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile

  • EA4: 91.197.228.252
  • cpanel-addons-production-feed: 91.197.228.252
  • cpanel-plugins: 91.197.228.252
  • base: mirror.sov.uk.goscomb.net
  • epel: mirrors.ukfast.co.uk
  • extras: mirror.sov.uk.goscomb.net
  • updates: mirror.sov.uk.goscomb.net
    No package php-mcrypt available.
    Error: Nothing to do

@motivatemedia

Use EasyApache to install the php-mcrypt

Thank @Tntdruid. But still not able to install work. Getting below error

yum install ea-php73-php-mcrypt
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 30 kB 00:00:00

  • EA4: 91.197.228.252
  • cpanel-addons-production-feed: 91.197.228.252
  • cpanel-plugins: 91.197.228.252
  • base: mirror.sov.uk.goscomb.net
  • epel: mirror.freethought-internet.co.uk
  • extras: mirror.sov.uk.goscomb.net
  • updates: mirror.sov.uk.goscomb.net
    EA4 | 2.9 kB 00:00:00
    cpanel-addons-production-feed | 2.9 kB 00:00:00
    cpanel-plugins | 2.9 kB 00:00:00
    base | 3.6 kB 00:00:00
    extras | 2.9 kB 00:00:00
    updates | 2.9 kB 00:00:00
    No package ea-php73-php-mcrypt available.
    Error: Nothing to do

If you're trying to install it for php7.2 (and it looks like you're using 7.3) or higher, this might help you out:

cPanel - mcrypt php extension

Thanks @rgerke

This works.

Below one works for PHP 7.3

/opt/cpanel/ea-php73/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.2

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct