How To Fix – Mcrypt PHP extension required in Laravel on Mac OS X (No MAMP)
Laravel PHP web framework requires certain libraries to function properly. One of these libraries is the mcrypt and the php-mcrypt (bridge between mcrypt and php). However, there is a good chance that you will run into issues while running Laravel if these libraries and the extensions are not properly installed.
When I got started with setting up Laravel on a Mac OS X Maverics development machine, i ran into this error which said: Mcrypt PHP extension required. This can be fixed easily - in two ways either by installing php54-mcrypt or the php55-mcrypt extension using homewbrew for mac or my manually compiling the php-mcrypt extension. The development machine has the pre-installed PHP on OS X maverics and not the one from a third party package installer like MAMP.
Step 1: Install mcrypt for Mac OS X Maverics using homebrew - this command:
sudo brew install mcrypt
Just in case you get a brew error while running this command, this will be the cowardly refusing to sudo error from brew, fix it and try the above command again.
Step 2: Install php-mcrypt extension using brew (based on your php version php 5.4 or php 5.5:
sudo brew install php55-mcrypt
or
sudo brew install php54-mcrypt
If you get errors like brew no available formula, then you will have to build the mcrypt extension for php manually which is a really easy step.
After you are done with above steps, you should now no longer see the Mcrypt PHP extension required error and you are all set to start your Laravel development.
Some sample outputs:
Debjit-Sahas-Mac-mini:app debjit$ brew install mcrypt
==> Installing mcrypt dependency: mhash
==> Downloading https://downloads.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.t
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/mhash/0.9.9.9
==> make install
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/mhash.h
/usr/local/include is not writable.You can try again using:
brew link mhash
==> Summary
If you encounter errors like the `brew link` step did not complete successfully or mcrypt.h not found then all you need to do is issue the following commands in your terminal:
sudo brew link mcrypt
if above does not work then try the following command:
sudo brew link --overwrite mcrypt
Once you restart Apache after following these steps, you will see the Laravel welcome message: You have arrived
How To Fix – Mcrypt PHP extension required in Laravel on Mac OS X (No MAMP)的更多相关文章
- laravel提示Mcrypt PHP extension required
系统Ubuntu 安装Apache,php后发现laravel报 Mcrypt PHP extension required错误 解决办法: apt-get install php5-mcrypt c ...
- ubuntu安装 laravel 过程中出现: mcrypt php extension required 的问题 | 以及composer相关问题 | Nginx安装
这篇文章对于Nginx的配置至关重要 如果碰到访问index.php不返回html而出现下载文件的问题,加上那段default就可以修正: https://www.digitalocean.com/c ...
- <亲测好使>mac os 安装mcrypt扩展
以前安装opencart的时候倒是不需要mcrypt 这个库.但是新版本需要了.加上自己的 是mac环境.当时闲麻烦,就一直没装.这次下午就寻思给装上吧! 1.首先你要先安装xcode这个工具.不然没 ...
- 在Mac OS X中完善PHP环境:memcache、mcrypt、igbinary
本文环境: Mac OS X 10.8.5 Xcode 5.0 Mac OS X升级到10.8.5之后,内置的Apache升级到2.2.24,PHP升级到了5.3.26.本文以此环境为基础. 本文简介 ...
- How to fix the bug “Expected "required", "optional", or "repeated".”?
参考:https://github.com/tensorflow/models/issues/1834 You need to download protoc version 3.3 (already ...
- 请教MAC OS下PHP的mcrypt怎么安装
安装方法一: 通过Homebrew安装mcrypt,安装成功 [Shell] 纯文本查看 复制代码 brew install mcrypt MCrypt是一个功能强大的加密算法扩展库,它包括有22种算 ...
- 【转】[fix] Wireshark error: There are no interfaces on which a capture can be done. on Mac OS X
I got the following error message when trying to open a network interface for capture using Wireshar ...
- Mac OS X 10.10 Yosemite PHP 5.5.14 free type support fix
通过将php将至5.4来勉强支持freetype扩展,不推荐此方法 after upgrading to new Mac OS X Yosemite, i noticed that free type ...
- Fix an “Unapproved Caller” SecurityAgent Message in Mac OS X
上午一进公司就被日本分公司的美女呼叫,说mac硬盘加密经常开机后需要输入硬盘加密密码才可以登录,我想应该是硬盘加密后没有给用户添加许可证,所以每次登录系统都要进行验证.于是远程到用户电脑上后,准备在硬 ...
随机推荐
- hdu 3966 树链剖分
思路:树链剖分入门题,我这门入得好苦啊,程序很快写出来了,可是在LCA过程中把update函数里的左右边界位置写反了,一直RE到死. #pragma comment(linker, "/ST ...
- hdu 4115 2-SAT判定
思路:将每个回合的平手和赢最为一对对立状态.那么后面就是2-SAT判断了. #include<iostream> #include<cstdio> #include<al ...
- 用户体验测试(UE测试)
用户体验测试(UE测试) 在测试周期早些时候就开始用户体验测试很明智.多数人往往会把UE测试放在最后,但UE测试可以揭示很多问题,如外观.字体.文本颜色.背景颜色.内容.布局等,还可以在测试周期尽可能 ...
- html背景自动移动
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...
- Charles 应用
1.首先设置本机host文件,将需要测试的域名指向127.0.0.1:(测试域名没有代理,才会这么操作): 2.打开Charles,设置Proxy选项,取消“Windows Proxy”选中状态: 3 ...
- PHP动态函数
header('Content-type:text/html;Charset=utf8'); function welcome(){ echo 'Welcome to you.'; } functio ...
- windows下部署 ISCSI存储
Write bt xiaoyang 配置篇 这里使用的软件为iscsiTargetqfe 1. 首先安装软件,可在微软官网下载 2. 然后找到安装程序 3. 完成安装后打 ...
- HTML+CSS学习笔记 (11) - CSS盒模型
元素分类 在讲解CSS布局之前,我们需要提前知道一些知识,在CSS中,html中的标签元素大体被分为三种不同的类型:块状元素.内联元素(又叫行内元素)和内联块状元素. 常用的块状元素有: <di ...
- Java中的哈希
Java中的哈希 前言 在开发中经常用到HashMap.HashSet等与哈希有关的数据结构,一直只知道这些哈希的数据结构不保证顺序,不清楚具体什么情况.所以在这里大致总结一下. Java的Has ...
- IPv6协议介绍
IPv6是为了解决基于IPv4的TCP/IP协议簇遇到的问题而推出的下一代IP协议.由于IPv4中采用的编制方式使得可用的网络地址和主机地址的数目远低于理论数目,随着全球互联网的快速发展,现有的IPv ...