标签:laravel mac php mysql apache
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
cd php-5.4.17/ext/mcrypt/ /usr/bin/phpize ./configure make sudo make install
Build complete.
如果phpize出现如下错误:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include /usr/include grep:
老实点,brew安装autoconf。
*如果make出现如下错误:
/ext/mcrypt/mcrypt.c:25:10: fatal error: 'php.h' file not found sudo ln -s
执行如下命令即可:
/usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No: Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
sudo vi /etc/php.ini
添加如下代码:(注意no-debug-non-zts-20121212版本号,如果不清楚可以前往/usr/lib/php/extensions/查看)
extension=<span style="font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, STHeiti, 'Microsoft Yahei', sans-serif;">/usr/lib/php/extensions/no-debug-non-zts-20090626/</span><span style="font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, STHeiti, 'Microsoft Yahei', sans-serif;">mcrypt.so</span>
这里还有点插曲,我遇到"You don‘t have permission to access / on this server."的提示,从字面意思是说,我们没有访问本服务器的权限,原因有可能是虚拟主机开启了,然后配置了deny from all?或者是storage没有权限?还是apache配置文件少了配置响应文件名:?
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php server.php
</IfModule>
最后怎么解决的不太记得了,原因可能上面所列。
执行完成后就可以在终端中运行mysql 命令了。设置 mysql 开机启动,大家按照自己的版本改:
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:laravel mac php mysql apache
原文地址:http://blog.csdn.net/nohaoye/article/details/47692907