I'm using macOS Mojave (10.14.3) and it already has apache2 and php 7.1 which are setup.

I want mcrypt installed but all the info on the internet including this uses brew. I didn't install php using brew so I am looking for a solution to install mcrypt using a non-brew method. Is this possible ?

I have pear - https://jasonmccreary.me/articles/install-pear-pecl-mac-os-x/
I found a solution for Ubuntu's PHP 7.2 : https://lukasmestan.com/install-mcrypt-extension-in-php7-2/

  • Check out this guy's solution. You should be able to use the second half or so: stackoverflow.com/a/51067784/850782 – EpicVoyage Apr 16 '19 at 18:26
  • But this again uses Brew. I have PHP 7.1 installed by default in Mojave. – anjanesh Apr 17 '19 at 4:07
  • Sorry, I had missed that. What I was looking at was this part: sudo /usr/local/opt/php/bin/pecl install mcrypt-1.0.1. pecl is now the recommended way to install mcrypt, but it may not be included in Mojave. PEAR does include pecl. jasonmccreary.me/articles/install-pear-pecl-mac-os-x recommends curl -O http://pear.php.net/go-pear.phar, sudo php -d detect_unicode=0 go-pear.phar. Once PEAR is configured, run pecl install mcrypt-1.0.1 – EpicVoyage Apr 17 '19 at 17:49

You must log in to answer this question.

Browse other questions tagged .