Magento 2 安装:无法解决要求

Magento 2 installation: requirements could not be resolved

按照 Get Magento of this guide 中的第 4 步,我 运行 出现以下错误:

Your requirements could not be resolved to an installable set of packages.

后跟缺少的扩展列表(例如 gddom)。

如何安装所有这些扩展?

Composer 不是 包管理器,它是依赖项管理器,因此它不会安装本机 php 包。您需要根据您的 PHP 和 OS 版本安装所需的软件包。 Centos 的说明是 here and that for Ubuntu is here