iT邦幫忙

0

laravel 無法新增檔案 Your requirements could not be resolved to an installable set of packages.

  • 分享至 

  • xImage
laravel new the

 _                               _
| |                             | |
| |     __ _ _ __ __ ___   _____| |
| |    / _` | '__/ _` \ \ / / _ \ |
| |___| (_| | | | (_| |\ V /  __/ |
|______\__,_|_|  \__,_| \_/ \___|_|

    Creating a "laravel/laravel" project at "./the"
    Installing laravel/laravel (v8.6.9)
      - Installing laravel/laravel (v8.6.9): Extracting archive
    Created project in C:\xampp\htdocs/the
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework[v8.65.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
    - league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires laravel/framework ^8.65 -> satisfiable by laravel/framework[v8.65.0, ..., 8.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

搜尋解決方法 , 忽略版本 , 但還是不行

C:\xampp\htdocs>composer install --ignore-platform-reqs
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files

C:\xampp\htdocs>laravel new aaa

 _                               _
| |                             | |
| |     __ _ _ __ __ ___   _____| |
| |    / _` | '__/ _` \ \ / / _ \ |
| |___| (_| | | | (_| |\ V /  __/ |
|______\__,_|_|  \__,_| \_/ \___|_|

    Creating a "laravel/laravel" project at "./aaa"
    Installing laravel/laravel (v8.6.9)
      - Installing laravel/laravel (v8.6.9): Extracting archive
    Created project in C:\xampp\htdocs/aaa
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework[v8.65.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
    - league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires laravel/framework ^8.65 -> satisfiable by laravel/framework[v8.65.0, ..., 8.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

是要在 php.ini 打開 ?

看更多先前的討論...收起先前的討論...
不要看到一堆英文就連讀也不讀
不是提示啟用擴展了?
alex9453 iT邦新手 2 級 ‧ 2021-12-23 10:22:05 檢舉
我就是看到 enable extensions , 但不知道它要 extensions 什麼 , 找到 API Extensions mysqli,pdo_mysql , 是這個嗎 ? 對 php,ini 不熟 , 要怎麼 extensions
fillano iT邦超人 1 級 ‧ 2021-12-23 11:42:48 檢舉
學好laravel之前,請先學好php
幫樓主餵狗,自己找原因喔
https://www.google.com/search?q=You+can+also+run+%60php+--ini%60+inside+terminal+to+see+which+files+are+used+by+PHP+in+CLI+mode.
參數下錯了吧,不要什麼都想複製貼上或是隨便打
Creating a "laravel/laravel" project at "./aaa"
Installing laravel/laravel (v8.6.9)
- Installing laravel/laravel (v8.6.9): Extracting archive
Created project in C:\xampp\htdocs/aaa <= 最好你的系統有能力建立這樣的目錄
建議樓主回去重念 計算機概論,還有作業系統 這兩門課程
另外 PHP 不是修過了,這些都搞不懂,可能 HTML 跟 PHP 都要重修
其實真的建議樓主放棄 IT 這一行,每次問的問題都是 "懶" 造成的
要樓主認真學習,就說要工作沒有更多的時間,那你在那掙扎啥,乾脆放棄比較快
alex9453 iT邦新手 2 級 ‧ 2021-12-23 15:41:51 檢舉
我只是打 laravel new aaa , 這個命令有錯嗎 ?
下面這些是系統執行 , 不是我打的
Creating a "laravel/laravel" project at "./aaa"
Installing laravel/laravel (v8.6.9)
- Installing laravel/laravel (v8.6.9): Extracting archive
Created project in C:\xampp\htdocs/aaa
greenriver iT邦研究生 5 級 ‧ 2021-12-23 16:09:43 檢舉
剛google: laravel Your requirements could not be resolved to an installable set of packages.
發現有影片教學: https://www.youtube.com/watch?v=epAZeeQE1r8
不知道是不是你要的
稍微看一下,裡面有提到php.ini修改
alex9453 iT邦新手 2 級 ‧ 2021-12-23 21:41:29 檢舉
窮嘶發發發 你什麼都看不懂 , 也要來指正別人 , 真不是蓋的
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答