Mamp pro上的Magento 2需要ext-mcrypt

时间:2016-03-22 16:49:40

标签: php magento composer-php mamp

我正在尝试在我的MAMP PRO上安装Magento 2,但是我从作曲家那里收到了这个错误:

*Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - magento/framework 100.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - magento/framework 100.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - Installation request for magento/framework 100.0.4 -> satisfiable by magento/framework[100.0.4].*

但是mcrypt安装在我的MAMP中:

Screenshot of phpinfo() in my MAMP environment

我尝试将php版本添加到.bash_profile文件,但它没有解决:

export MAMP_PHP=/Applications/MAMP/bin/php/php5.5.10/bin
export PATH="$MAMP_PHP:$PATH"

我尝试运行php -i | grep mcrypt这是结果: 〜/ Sites / magento2 $ php -i | grep mcrypt

配置Command => './configure'' - with-mysql = mysqlnd'' - with-gd'' - with-jpeg-dir = / Applications / MAMP / Library'' - with-png-dir = / Applications / MAMP / Library'' - with-zlib'' - with-zlib-dir = / Applications / MAMP / Library'' - with-freetype-dir = / Applications / MAMP / Library'' - prefix = / Applications / MAMP / bin / php / php5.6.10'' - exec-prefix = / Applications / MAMP / bin / php / php5.6.10'' - sysconfdir = / Applications / MAMP / bin / php / php5.6.10 / conf' '--with-config-file-path = / Applications / MAMP / bin / php / php5.6.10 / conf'' - enable-ftp'' - enable-gd-native-ttf'' - with-bz2 = / usr'' - with-ldap'' - with-mysqli = mysqlnd'' - with-t1lib = / Applications / MAMP / Library''--enable-mbstring = all'' - with-curl = / Applications / MAMP / Library''enable-sockets'' - enable-bcmath'' - with-imap = shared,/ Applications / MAMP / Library / lib / imap-2007f'' - enable-soap' '--with-kerberos'' - enable-calendar'' - with-pgsql = shared,/ Applications / MAMP / Library / pg'' - enable-exif'' - with-libxml-dir = / Applications / MAMP / Library'' - with-gettext = shared,/ Applications / MAMP / Library'' - w ith-xsl = / Applications / MAMP / Library'' - with-pdo-mysql = mysqlnd'' - with-pdo-pgsql = shared,/ Applications / MAMP / Library / pg'' - with-mcrypt = shared ,/ Applications / MAMP / Library'' - with-openssl'' - enable-zip'' - with-iconv = / Applications / MAMP / Library''enable-opcache''--enable-cgi' '--enable-intl'' - with-icu-dir = / Applications / MAMP / Library'' - with-tidy = shared'' - enable-wddx'' - with-libexpat-dir = / Applications / MAMP / Library'' - with-readline''CFLAGS = -arch'LDFLAGS = -arch'LIBS = -lresolv''CXXFLAGS = -arch 已注册的流过滤器=> zlib。,bzip2。,convert.iconv。,string.rot13,string.toupper,string.tolower,string.strip_tags,convert。,consume,dechunk,mcrypt。 ,mdecrypt。

mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value

1 个答案:

答案 0 :(得分:2)

在Mac上运行MAMP: 您需要找到正在运行的php版本的php.ini文件,并替换extension_dir行,如下所示。 (确保将“php5.6.10”替换为您的版本,将“no-debug-non-zts-20131226”替换为扩展名内的文件夹名称。)

php.ini文件通常位于:mamp / php / your-php-version / conf

UITextView