在 forge 上安装 Laravel 5.2 时出错
Posted
技术标签:
【中文标题】在 forge 上安装 Laravel 5.2 时出错【英文标题】:Error installing Laravel 5.2 on forge 【发布时间】:2016-06-20 10:34:49 【问题描述】:我正在尝试解决此错误,并到处寻找答案。我检查了它们都在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.
【问题讨论】:
【参考方案1】:升级到 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
安装同样缺失的phpunit:
sudo apt-get install phpunit
它奏效了。
【讨论】:
以上是关于在 forge 上安装 Laravel 5.2 时出错的主要内容,如果未能解决你的问题,请参考以下文章
Laravel 5.2 - 使用 composer 和 git bash 安装 laravel 时出错