简体   繁体   English

Bitnami MAMP堆栈中的Mcrypt扩展要求错误

[英]Mcrypt Extention required error in Bitnami MAMP stack

I am using Bitnami MAMP Stack 5.6.34. 我正在使用Bitnami MAMP Stack 5.6.34。 And installed it as root user so it loads at port 80. I am trying to install laravel 4.2 using composer and it shows that: 并以root用户身份安装它,以便在端口80加载。我试图使用composer安装laravel 4.2,它显示:

Mcrypt PHP extension required error.

and also while I try to use 而且当我尝试使用

php artisan 

it does not work. 这是行不通的。 Mcrypt is installed as it shows Enabled while I output phpinfo() function. 当我输出phpinfo()函数时,Mcrypt已安装,因为它显示已启用。 But it still does not show up when I try using 但是当我尝试使用时它仍然没有显示

php -m | grep mcrypt

I have modified php.ini file as follows: 我修改了php.ini文件,如下所示:

mcrypt.algorithms_dir= /Applications/mampstack/common/lib/libmcrypt
mcrypt.modes_dir= /Applications/mampstack/common/lib/libmcrypt

But it does not work and still shows: Mcrypt PHP extension required error. 但是它不起作用,仍然显示:Mcrypt PHP扩展所需的错误。 But when I cd into mampstack and then use 但是当我CD进入Mampstack然后使用

sudo ./use_mampstack

then in the terminal I don't get any error while using composer install and can also use php artisan command as it finds that Mcrypt is enabled. 然后在终端中,使用composer install时不会出现任何错误,还可以使用php artisan命令,因为它发现已启用Mcrypt。 How can I get rid the Mcrypt error and load it with installed php 我如何摆脱Mcrypt错误并使用已安装的php加载它

Bitnami Engineer here. Bitnami工程师在这里。 I just installed Laravel in a fresh Bitnami installation in Mac OS X. These are the steps I followed 我刚刚在Mac OS X的全新Bitnami安装中安装了Laravel。这些是我遵循的步骤

cd installdir/frameworks
curl -LO "https://github.com/laravel/laravel/archive/v4.2.11.zip"
unzip v4.2.11.zip
mv laravel-4.2.11 laravel
cd laravel
composer install
php artisan --version

Then, configure Apache using the similar config files (httpd-prefix.conf and httpd-app.conf) than the other frameworks or the ones at installdir/docs/demo . 然后,使用与其他框架或installdir/docs/demo类似的配置文件(httpd-prefix.conf和httpd-app.conf)配置Apache。 You will only need to modify the different paths in those files and include the httpd-prefix.conf file in the installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf file. 您只需要修改这些文件中的不同路径,并将httpd-prefix.conf文件包括在installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf文件中。 Restart Apache at the end to load this configuration. 最后重新启动Apache以加载此配置。

I hope this helps 我希望这有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM