[英]composer install doesn't work in phpstorm
I clone a laravel repository from github. 我从github克隆了一个laravel仓库。 I want install it on phpstorm but when I run this command
composer install
in terminal environment, this error appeared: 我想将其安装在phpstorm上,但是在终端环境中运行此命令
composer install
时,出现此错误:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpunit/phpunit 5.7.9 requires ext-dom * -> the requested PHP
...
- phpunit/phpunit 5.2.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/phpunit ^5.2 -> satisfiable by phpunit/phpunit[5..., 5.7.7, 5.7.8, 5.7.9].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
...
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
and this is my composer.json file: 这是我的composer.json文件:
{
"name": "cydrobolt/polr",
"description": "The Polr URL Shortener.",
"keywords": ["url-shortener", "url", "cms"],
"require": {
"php": ">=5.5.9",
"laravel/lumen-framework": "5.1.*",
"vlucas/phpdotenv": "~1.0",
"illuminate/mail": "~5.1",
"google/recaptcha": "~1.1"
},
"require-dev": {
"fzaninotto/faker": "~1.0",
"phpunit/phpunit": "^5.2",
"symfony/css-selector": "^3.0"
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/"
]
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"config": {
"preferred-install": "dist"
}
}
I try this solution but it doesn't work. 我尝试了此解决方案,但是它不起作用。 What is the problem?
问题是什么?
You are missing an extension in your php.ini setting. 您在php.ini设置中缺少扩展名。 Install the extension for ext-dom, then reload/restart your server and run "composer install" again.
安装ext-dom的扩展,然后重新加载/重新启动服务器并再次运行“ composer install”。
If your using Linux with apt-get then you can install ext-dom with this command: sudo apt-get install php-xml 如果您将Linux与apt-get结合使用,则可以使用以下命令安装ext-dom:sudo apt-get install php-xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.