Skip to content

Instantly share code, notes, and snippets.

@leminh111
Forked from idleberg/Install-Mcrypt.md
Created October 1, 2018 16:08
Show Gist options
  • Save leminh111/6a5394f97e98457621b2ffb8d9a5a66b to your computer and use it in GitHub Desktop.
Save leminh111/6a5394f97e98457621b2ffb8d9a5a66b to your computer and use it in GitHub Desktop.
Install Mcrypt on macOS

Setup php-mycrypt on macOS (and versions of Mac OS X)

These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.

Install

Install Mcrypt using Homebrew

# PHP 7
brew install php70-mcrypt

# PHP 5
brew install php56-mcrypt --without-homebrew-php

Add this line to /private/etc/php.ini:

# PHP 7
extension="/usr/local/Cellar/php70-mcrypt/7.0.x/mcrypt.so"

# PHP 5
extension="/usr/local/Cellar/php56-mcrypt/5.6.x/mcrypt.so"

You are ready to go!

Upgrade

Upgrade Mcrypt using Homebrew

brew reinstall -fs php71-mcrypt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment