日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

解决docker容器中使用composer,无法解析安装包

發布時間:2024/3/13 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决docker容器中使用composer,无法解析安装包 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

解決docker容器中使用composer,無法解析安裝包


在laradock中進入容器,composer install -vvv出現了無法解析包的問題

// A code block Dependency resolution completed in 0.000 seconds Your requirements could not be resolved to an installable set of packages.Problem 1- Root composer.json requires fideloper/proxy, it could not be found in any version, there may be a typo in the package name.Problem 2- Root composer.json requires fruitcake/laravel-cors, it could not be found in any version, there may be a typo in the package name.Problem 3- Root composer.json requires guzzlehttp/guzzle, it could not be found in any version, there may be a typo in the package name.Problem 4- Root composer.json requires laravel/framework, it could not be found in any version, there may be a typo in the package name.Problem 5- Root composer.json requires laravel/tinker, it could not be found in any version, there may be a typo in the package name.Problem 6- Root composer.json requires facade/ignition, it could not be found in any version, there may be a typo in the package name.Problem 7- Root composer.json requires fakerphp/faker, it could not be found in any version, there may be a typo in the package name.Problem 8- Root composer.json requires laravel/sail, it could not be found in any version, there may be a typo in the package name.Problem 9- Root composer.json requires mockery/mockery, it could not be found in any version, there may be a typo in the package name.Problem 10- Root composer.json requires nunomaduro/collision, it could not be found in any version, there may be a typo in the package name.Problem 11- Root composer.json requires phpunit/phpunit, it could not be found in any version, there may be a typo in the package name.Potential causes:- A typo in the package name- The package is not available in a stable-enough version according to your minimum-stability settingsee <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.- It's a private package and you forgot to add a custom repository to find it

查看composer反饋信息,一開始也以為是版本問題,但切換了版本后還是一樣的錯誤

既然這樣就是comppser源的問題了,在composer.json中更換了一個源,
下面展示一些 內聯代碼片。

// 原來的地址"repositories": {"packagist": {"type": "composer","url": "https://packagist.phpcomposer.com"}} // 更換后的"repositories": {"packagist": {"type": "composer","url": "https://packagist.org"}}

服務器使用的是香港的,所以以上地址請求是正常的,如果只能國內訪問,去開源社區上去換下地址

再次使用composer install -vvv
成功

總結

以上是生活随笔為你收集整理的解决docker容器中使用composer,无法解析安装包的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。