Mamp pro上的Magento 2需要ext-mcrypt



我正在尝试在我的 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 中:

我的 MAMP 环境中phpinfo()的屏幕截图

我尝试将 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 |格雷普·麦克里普特

配置命令 => './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' '--with-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., consumptiond, dechunk, mcrypt.,解密。

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

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

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

extension_dir = "/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/"

相关内容

  • 没有找到相关文章