我照這個裝 https://pandalab.org/articles/90
這裡就出現問題
composer global require laravel/installer
C:\xampp\htdocs>composer self-update
You are already using the latest available Composer version 2.1.12 (stable channel).
C:\xampp\htdocs>composer global require laravel/installer
Changed current directory to C:/Users/Kevin/AppData/Roaming/Composer
Using version ^4.2 for laravel/installer
./composer.json has been updated
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer[v4.2.0, ..., v4.2.9] require symfony/console ^4.0|^5.0 -> satisfiable by symfony/console[v4.3.5].
- symfony/console v4.3.5 requires php ^7.1.3 -> your php version (8.0.12) does not satisfy that requirement.
- Root composer.json requires laravel/installer ^4.2 -> satisfiable by laravel/installer[v4.2.0, ..., v4.2.9].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/installer:*" to figure out if any version is installable, or "composer require laravel/installer:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
搜尋解決方法
composer update --ignore-platform-reqs
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
應該是PHP 版本問題
-laravel/installer[v4.2.0, ..., v4.2.9] require symfony/console ^4.0|^5.0 -> satisfiable by symfony/console[v4.3.5].
-symfony/console v4.3.5 requires php ^7.1.3 -> your php version (8.0.12) does not satisfy that requirement.
-Root composer.json requires laravel/installer ^4.2 -> satisfiable by laravel/installer[v4.2.0, ..., v4.2.9].
安裝Laravel 4.2 要PHP 5.4 以上版本。
Server Requirements
The Laravel framework has a few system requirements:
PHP >= 5.4
MCrypt PHP Extension
PHP 版本不能太新不能太舊,個人建議用5.4就好!
謝謝答覆 , 原來太新還不行 , 我去下載 5.4 卻無法下載 , 是這個網頁嗎 ?
phph5.42 可以用在 windows 下嗎 ? 他沒有 php.exe 執行檔 , 搜尋網路找不到怎麼裝
我找到這個希望幫到你。
謝謝
成功了?
我還在 virtualbox 上裝 centos 8 中
加油!
請問安裝 laravel 4.2 , 指令要怎麼下
composer global require laravel/installer
Changed current directory to C:/Users/Kevin/AppData/Roaming/Composer
Using version ^4.2 for laravel/installer
./composer.json has been updated
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
11 packages you are using are looking for funding.
Use the `composer fund` command to find out more!