我有一个Laravel应用程序,我注意到我不再能够安装任何软件包。举个例子。我正在尝试安装在其他项目上做了很多次的kint
下面是输出示例,我希望这足以使某人向正确的方向指出。我该怎么办才能解决此问题?
composer require kint-php/kint --dev -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/var/www/my-application): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /root/.config/composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /var/www/my-application/vendor/composer/installed.json
Running 1.6.3 (2018-01-31 16:28:17) with PHP 7.4.3 on Linux / 4.15.0-58-generic
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Executing command (/var/www/my-application/nova/): git branch --no-color --no-abbrev -v
Executing command (/var/www/my-application/nova/): git rev-list master..develop
Executing command (/var/www/my-application/nova-components/Dark/): git branch --no-color --no-abbrev -v
Downloading https://packagist.org/packages.json
Writing /root/.cache/composer/repo/https---packagist.org/packages.json into cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2013.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2014.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2015.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2016.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2017.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2018.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019-04.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019-07.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019-10.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2020-01.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-archived.json from cache
Downloading http://packagist.org/p/provider-latest%241cb0d80d8313b943a23518d09fb5045f87b8cbc543ff991b11683d4b9c385168.json
Writing /root/.cache/composer/repo/https---packagist.org/p-provider-latest.json into cache
Reading /root/.cache/composer/repo/https---packagist.org/provider-kint-php$kint.json from cache
Using version ^3.3 for kint-php/kint
./composer.json has been updated
Reading ./composer.json
Loading config file ./composer.json
Executing command (/var/www/my-application): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /root/.config/composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /var/www/my-application/vendor/composer/installed.json
Reading ./composer.lock
Loading composer repositories with package information
Executing command (/var/www/my-application/nova/): git branch --no-color --no-abbrev -v
Executing command (/var/www/my-application/nova/): git rev-list master..develop
Executing command (/var/www/my-application/nova-components/Dark/): git branch --no-color --no-abbrev -v
Downloading https://packagist.org/packages.json
Writing /root/.cache/composer/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2013.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2014.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2015.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2016.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2017.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2018.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019-04.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019-07.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2019-10.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-2020-01.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-archived.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/p-provider-latest.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/provider-psr$http-message.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/provider-psr$log.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/provider-psr$simple-cache.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/provider-algolia$algoliasearch-client-php.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/provider-illuminate$console.json from cache
Reading /root/.cache/composer/repo/https---packagist.org/provider-illuminate$contracts.json from cache
Killed
以下是我的composer.json
的一个示例。我目前不确定该怎么做,但正在考虑删除软件包并尝试进行安装。
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"ext-imagick": "*",
"algolia/scout-extended": "^1.9",
"barryvdh/laravel-debugbar": "^3.2",
"benjaminhirsch/nova-slug-field": "^1.2",
"bidgarage/dark": "*",
"butschster/meta-tags": "^1.4",
"carlson/nova-link-field": "^1.0",
"davejamesmiller/laravel-breadcrumbs": "^5.3",
"drewm/mailchimp-api": "^2.5",
"elasticsearch/elasticsearch": "^7.6",
"fideloper/proxy": "^4.0",
"froala/nova-froala-field": "^3.2",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.5",
"jenssegers/agent": "^2.6",
"laravel/cashier": "^10.7",
"laravel/framework": "^6.0",
"laravel/horizon": "^3.3",
"laravel/nova": "*",
"laravel/passport": "^7.3",
"laravel/scout": "^8.0",
"laravel/slack-notification-channel": "^2.0",
"laravel/socialite": "^4.1",
"laravel/telescope": "^3.2",
"laravel/tinker": "^1.0",
"league/csv": "^9.3",
"league/flysystem-aws-s3-v3": "^1.0",
"predis/predis": "^1.1",
"pusher/pusher-php-server": "^4.0",
"spatie/laravel-backup": "^6.7",
"spatie/laravel-cookie-consent": "^2.11",
"spatie/laravel-image-optimizer": "^1.6",
"stripe/stripe-php": "^7.27"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"kint-php/kint": "^3.3",
"laracasts/generators": "^1.1",
"laracasts/testdummy": "~2.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"repositories": [
{
"type": "path",
"url": "./nova"
},
{
"type": "path",
"url": "./nova-components/Dark"
}
],
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-install-cmd": [
"chmod -R 777 storage",
"php artisan passport:install",
"php artisan storage:link"
]
}
}