首页 > 解决方案 > 无法使用终端在 Mac 的本地主机上安装 Contao CMS

问题描述

我在 Mac 上安装 Contao 时遇到问题。我运行从这里得到的命令

composer create-project contao/managed-edition

但我收到了这个错误

hasnainshafqat@Hasnains-MBP project % composer create-project contao/managed-edition

PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/intl, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl), /usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so)) in Unknown on line 0
Creating a "contao/managed-edition" project at "./managed-edition"
Installing contao/managed-edition (4.9)
  - Installing contao/managed-edition (4.9): Loading from cache
Created project in /Users/hasnainshafqat/contao/project/managed-edition
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - contao/newsletter-bundle 4.9.2 requires contao/core-bundle 4.9.2 -> satisfiable by contao/core-bundle[4.9.2].
    - contao/newsletter-bundle 4.9.1 requires contao/core-bundle 4.9.1 -> satisfiable by contao/core-bundle[4.9.1].
    - contao/newsletter-bundle 4.9.0 requires contao/core-bundle 4.9.0 -> satisfiable by contao/core-bundle[4.9.0].
    - contao/core-bundle 4.9.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - contao/core-bundle 4.9.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - contao/core-bundle 4.9.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - Installation request for contao/newsletter-bundle ^4.9 -> satisfiable by contao/newsletter-bundle[4.9.0, 4.9.1, 4.9.2].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

我已经从 php.ini 文件中启用了扩展,但我仍然不知道我做错了什么。这是我的安装视频。请让我知道我要修复的 php 版本是什么

hasnainshafqat@Hasnains-MBP project % php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/intl, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl), /usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/intl.so)) in Unknown on line 0
PHP 7.3.11 (cli) (built: Feb 29 2020 02:50:36) ( NTS )

标签: phpcontao

解决方案


推荐阅读