亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Homestead安裝完成,git克隆下來的項目不能運行composer install和php artisan命令

Homestead安裝完成,git克隆下來的項目不能運行composer install和php artisan命令

PHP
長風秋雁 2019-03-08 03:19:19
運行composer install報錯如下 Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages. Problem 1 - This package requires php ^7.1.3 but your PHP version (7.0.1) does not satisfy that requirement. Problem 2 - Installation request for chillerlan/php-qrcode 2.0.6 -> satisfiable by chillerlan/php-qrcode[2.0.6]. - chillerlan/php-qrcode 2.0.6 requires php >=7.0.3 -> your PHP version (7.0.1) does not satisfy that requirement. Problem 3 - Installation request for chillerlan/php-traits 1.1.13 -> satisfiable by chillerlan/php-traits[1.1.13]. - chillerlan/php-traits 1.1.13 requires php >=7.0.3 -> your PHP version (7.0.1) does not satisfy that requirement. Problem 4 - Installation request for laravel/framework v5.7.5 -> satisfiable by laravel/framework[v5.7.5]. - laravel/framework v5.7.5 requires php ^7.1.3 -> your PHP version (7.0.1) does not satisfy that requirement. Problem 5 - Installation request for laravel/horizon v1.4.0 -> satisfiable by laravel/horizon[v1.4.0]. - laravel/horizon v1.4.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system. Problem 6 - Installation request for symfony/cache v4.1.4 -> satisfiable by symfony/cache[v4.1.4]. - symfony/cache v4.1.4 requires php ^7.1.3 -> your PHP version (7.0.1) does not satisfy that requirement. Problem 7 - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.1) does not satisfy that requirement. - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.1) does not satisfy that requirement. - Installation request for doctrine/inflector v1.3.0 -> satisfiable by doctrine/inflector[v1.3.0]. To enable extensions, verify that they are enabled in your .ini files: - D:\PHPWAMP_IN2\phpwamp\server\php-7.0.1\php.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. 運行php artisan make:controller TestController報錯如下 PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in D :\code\tiyu\vendor\symfony\console\Output\Output.php on line 40 Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in D:\cod e\tiyu\vendor\symfony\console\Output\Output.php on line 40 然后嘗試刪除那個問號,報錯如下 PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Component\Console\Output\is_iterable() in D:\code\tiyu\vendor\symfony\console\Output\Output.php:140 Stack trace: #0 D:\code\tiyu\vendor\symfony\console\Output\Output.php(132): Symfony\Component\Console\Output\Output->write('', true, 16) #1 D:\code\tiyu\vendor\symfony\console\Application.php(741): Symfony\Component\Console\Output\Output->writeln('', 16) #2 D:\code\tiyu\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(469): Symfony\Component\Console\Application->renderException(Object(Symfony\Component\Debug\Exception\Fatal ThrowableError), Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 D:\code\tiyu\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(101): Illuminate\Foundation\Exceptions\Handler->renderForConsole(Object(Symfony\Component\Console\O utput\ConsoleOutput), Object(Symfony\Component\Debug\Exception\FatalThrowableError)) #4 D:\code\tiyu\vendor\laravel\framework\src\Illuminate\Foundation in D:\code\tiyu\vendor\symfony\console\Output\Output.php on line 140 PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Component\Console\Output\is_iterable() in D:\code\tiyu\vendor\symfony\console\Output\Output.php:140 Stack trace: #0 D:\code\tiyu\vendor\symfony\console\Output\Output.php(132): Symfony\Component\Console\Output\Output->write('', true, 16) #1 D:\code\tiyu\vendor\symfony\console\Application.php(741): Symfony\Component\Console\Output\Output->writeln('', 16) #2 D:\code\tiyu\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(469): Symfony\Component\Console\Application->renderException(Object(Symfony\Component\Debug\Exception\Fatal ErrorException), Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 D:\code\tiyu\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(101): Illuminate\Foundation\Exceptions\Handler->renderForConsole(Object(Symfony\Component\Console\O utput\ConsoleOutput), Object(Symfony\Component\Debug\Exception\FatalErrorException)) #4 D:\code\tiyu\vendor\laravel\framework\src\Illuminate\Foundation in D:\code\tiyu\vendor\symfony\console\Output\Output.php on line 140
查看完整描述

3 回答

?
GCT1015

TA貢獻1827條經驗 獲得超4個贊

它要求 php 7.1.3 至少,而你的環境只有 7.0.1
它還要求 ext-pcntl 擴展而你沒有開

查看完整回答
反對 回復 2019-03-18
?
絕地無雙

TA貢獻1946條經驗 獲得超4個贊

1樓說的沒錯,你的php版本不對。不過我奇怪的是,你說你裝好了homestead,homestead里面的php版本是7.1的,不應該出現你所說的問題的

查看完整回答
反對 回復 2019-03-18
?
慕桂英4014372

TA貢獻1871條經驗 獲得超13個贊

已經解決了,謝謝大家了

查看完整回答
反對 回復 2019-03-18
  • 3 回答
  • 0 關注
  • 1170 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號