无法在Magento 2.2.4安装程序上运行composer安装

时间:2018-07-03 14:41:28

标签: php composer-php homebrew magento2

克隆存储库后,我目前无法在本地主机上设置现有的Magento站点,因此无法运行composer install。我收到以下错误:

Problem 1
- Installation request for magento/framework 101.0.4 -> satisfiable by magento/framework[101.0.4].
- magento/framework 101.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
Problem 2
- Installation request for magento/magento2-base 2.2.4 -> satisfiable by magento/magento2-base[2.2.4].
- magento/magento2-base 2.2.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 3
- Installation request for magento/product-community-edition 2.2.4 -> satisfiable by magento/product-community-edition[2.2.4].
- magento/product-community-edition 2.2.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.

因此似乎缺少一些PHP扩展,但是当尝试通过brew安装它们时,会发生以下错误:

Error: No available formula with the name "php71-mcrypt" 
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

如果我使用brew list,它会显示mcrypt已经安装,但是卸载并没有帮助。我也尝试过完全重新安装brew,但这也无济于事。 我对Magento和Brew都缺乏经验,所以如果我在这里缺少任何信息,请告诉我。

2 个答案:

答案 0 :(得分:1)

brew上使用哪个PHP版本? (php -v) 即使brew服务显示7.1正在运行,我实际上也默认为7.0。

答案 1 :(得分:1)

按照显示的顺序输入以下命令:

brew update && brew upgrade
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew unlink php70 or 56 
brew install php71
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0

您可以在上面的命令中用7.1替换7.0,以获取7.1版的PHP

如果php -v的输出仍未回显版本7,只需键入此命令以更新您的路径,这应该可以解决问题,如php-osx.liip.ch网站上所述。

export PATH=/usr/local/php5/bin:$PATH

export PATH=”$(brew — prefix homebrew/php/php70)/bin:$PATH

export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH
相关问题