在 Forge 上安装 Laravel 5.2 时出错

Error installing Laravel 5.2 on forge

我正在尝试解决这个错误,并到处寻找答案。我检查了它们都在 ini 文件中启用,但它给我错误。

正在加载包含包信息的作曲家存储库 从锁定文件安装依赖项 无法将您的要求解析为一组可安装的软件包。

问题 1 - sabre/xml dev-master 的安装请求 -> 可由 sabre/xml[dev-master] 满足。 - sabre/xml dev-master 需要 ext-dom * -> 您的系统缺少请求的 PHP 扩展 dom。

To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-curl.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gd.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-igbinary.ini
    - /etc/php/7.0/cli/conf.d/20-imap.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mbstring.ini
    - /etc/php/7.0/cli/conf.d/20-mcrypt.ini
    - /etc/php/7.0/cli/conf.d/20-mysqli.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_pgsql.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_sqlite.ini
    - /etc/php/7.0/cli/conf.d/20-pgsql.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sqlite3.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-zlib.ini
    - /etc/php/7.0/cli/conf.d/25-memcached.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

升级到 ubuntu 16.04 后,我遇到了同样的问题,默认情况下 php7。我能够通过 运行 以下命令解决它 运行更新命令:

      sudo apt-get update

缺少 mycript,需要安装:

      sudo apt-get install mcrypt php7.0-mcrypt

运行升级命令:

      sudo apt-get upgrade

安装同样缺少的 php-mbstring:

     sudo apt-get install php-mbstring

安装同样缺少的 php 单元:

     sudo apt-get install phpunit

它奏效了。