0

I know there are similar questions, but none help me. I have tried installing mcrypt y using these commands

sudo apt install php-dev libmcrypt-dev php-pear
sudo pecl channel-update pecl.php.net
sudo pecl install mcrypt-1.0.1

Which gives me this error

downloading mcrypt-1.0.1.tgz ...
Starting to download mcrypt-1.0.1.tgz (33,782 bytes)
.........done: 33,782 bytes
6 source files, building
running: phpize
sh: 1: phpize: not found
ERROR: `phpize' failed

I need this badly to get my cookies encrypted. Anyhelp would be appreciated.

2
  • Is phpize found in /usr/bin/phpize? May 1, 2019 at 13:00
  • If you are asking for the file, then yes, there is a file. May 1, 2019 at 13:09

2 Answers 2

0

Weird, but I think I followed a wrong tutorial. These commands helped me fix it

sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install php7.2-dev
sudo apt-get -y install libmcrypt-dev

Followed by

sudo bash -c "echo extension=/usr/lib/php/20170718/mcrypt.so > /etc/php/7.2/cli/conf.d/mcrypt.ini"
sudo bash -c "echo extension=/usr/lib/php/20170718/mcrypt.so > /etc/php/7.2/apache2/conf.d/mcrypt.ini"

After which

php -i | grep mcrypt

gives

/etc/php/7.2/cli/conf.d/mcrypt.ini
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value

I hope the installtion was successful.

0

According to https://pecl.php.net/package/mcrypt Release 1.0.1 that you are trying to install is only supported up to PHP 7.3.0.

Release 1.0.1:
==================

Dependencies:
    PHP Version: PHP version 7.3.0 or older
    PHP Version: PHP 7.2.0 or newer
    PEAR Package: PEAR 1.4.0 or newer
1
  • Sorry, but something was really bad. Earlier in the morning, when I was trying to install it in my gcp, I had PHP 7.3.4. the apt purge would say that php7.3.4 was not installed. Few hours before, I had to create a new instance with my snapshot. I tried the same but this time apt purge worked and php -v gave me 7.2.x. To make it, even more, worse, all these happened while I was posting this questions, so I even had to edit the summary but forgot to change the question. Thanks anyway! May 1, 2019 at 13:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .