在 Forge 上安装 Laravel 5.2 时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35834212/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error installing Laravel 5.2 on forge
提问by manshu
I am trying to resolve this error, and looking for answer everywhere. I checked and they are all enabled in ini file, and it's giving me error.
我正在尝试解决此错误,并到处寻找答案。我检查过,它们都在 ini 文件中启用,它给了我错误。
Loading composer repositories with package information Installing dependencies from lock file Your requirements could not be resolved to an installable set of packages.
使用包信息加载 Composer 存储库 从锁定文件安装依赖项 您的需求无法解析为一组可安装的包。
Problem 1 - Installation request for sabre/xml dev-master -> satisfiable by sabre/xml[dev-master]. - sabre/xml dev-master requires ext-dom * -> the requested PHP extension dom is missing from your system.
问题 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.
回答by James Njuguna
I was facing the same issue after upgrading to ubuntu 16.04 which by default comes with php7. I was able to resolve it by running the following commands Run the update comand:
升级到 ubuntu 16.04 后,我遇到了同样的问题,默认情况下,php7 随附。我能够通过运行以下命令来解决它运行更新命令:
sudo apt-get update
They mycript is missing and needs to be installed:
他们 mycript 丢失,需要安装:
sudo apt-get install mcrypt php7.0-mcrypt
Run the upgrade command:
运行升级命令:
sudo apt-get upgrade
Install the php-mbstring which is also missing:
安装同样缺失的 php-mbstring:
sudo apt-get install php-mbstring
Install the phpunit which is also missing:
安装同样缺失的 phpunit:
sudo apt-get install phpunit
And it worked.
它奏效了。