Composer 2.0.8发布程序包-版本-已弃用
使用php 7.2
- Installing composer/package-versions-deprecated (1.8.0): Extracting archive
Plugin initialization failed (include(/home/vagrant/.../vendor/composer/package-versions-deprecated/src/PackageVersions/Installer.php): failed to open stream: No such file or directory), uninstalling plugin
- Removing composer/package-versions-deprecated (1.8.0)
Install of composer/package-versions-deprecated failed
[RuntimeException]
Could not delete /home/vagrant/.../vendor/composer/package-versions-deprecated/src:
我正在使用laavel home stead,看到这一点,不知道问题出在哪里。为了从头开始,我已经多次移除和添加了LALAVEL宅基地盒子。但是,每次我在重新安装后都会遇到这个问题。它也没有列在Composer.json中。
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2",
"ext-json": "*",
"arcanedev/log-viewer": "^5.1",
"asvae/laravel-api-tester": "^2.0",
"aws/aws-sdk-php": "^3.101",
"bepsvpt/secure-headers": "^5.3",
"beyondcode/laravel-websockets": "^1.8",
"doctrine/annotations": "^1.6",
"doctrine/couchdb": "^1.0@beta",
"doctrine/dbal": "^2.7",
"fideloper/proxy": "^4.0",
"firebase/php-jwt": "^5.0",
"gluedev/laravel-stackdriver": "^0.1.2",
"google/cloud": "^0.96.0",
"google/protobuf": "^3.8",
"graylog2/gelf-php": "^1.6",
"hoa/console": "^3.17",
"ircmaxell/random-lib": "^1.2",
"kitetail/zttp": "^0.6.0",
"ktamas77/firebase-php": "^2.2",
"langleyfoxall/laravel-nist-password-rules": "^4.1",
"laravel/framework": "6.18.22",
"laravel/passport": "^9.3",
"laravel/tinker": "^2.0",
"laravel-notification-channels/twilio": "^3.1",
"league/csv": "^9.1",
"league/flysystem-aws-s3-v3": "^1.0",
"league/flysystem-azure-blob-storage": "^0.1.6",
"league/flysystem-cached-adapter": "^1.0",
"league/flysystem-rackspace": "^1.0",
"league/flysystem-sftp": "^1.0",
"league/flysystem-webdav": "^1.0",
"league/flysystem-ziparchive": "^1.0",
"mockery/mockery": "^1.0",
"mollie/polyfill-libsodium": "^1.1",
"nexmo/client": "^1.8",
"nyholm/psr7": "^1.1",
"ocramius/package-versions": "1.4.2",
"opencensus/opencensus-exporter-stackdriver": "~0.1",
"pda/pheanstalk": "^4.0",
"php-amqplib/php-amqplib": "^2.9",
"php-console/php-console": "^3.1",
"phpseclib/mcrypt_compat": "^1.0",
"phpunit/php-invoker": "^2.0",
"predis/predis": "^1.1",
"propaganistas/laravel-intl": "^3.0",
"propaganistas/laravel-phone": "^4.2",
"psr/event-dispatcher": "^1.0",
"pusher/pusher-php-server": "~3.4.1",
"ramsey/uuid-doctrine": "^1.5",
"rbdwllr/reallysimplejwt": "^2.0.42",
"rollbar/rollbar": "^1.8",
"ruflin/elastica": "^6.1",
"spatie/flysystem-dropbox": "^1.1",
"spatie/laravel-fractal": "^5.6",
"spatie/laravel-permission": "^3.6",
"symfony/browser-kit": "^4.3",
"symfony/config": "^4.3",
"symfony/dependency-injection": "^4.3",
"symfony/dom-crawler": "^4.3",
"symfony/expression-language": "^4.3",
"symfony/lock": "^4.3",
"symfony/translation": "4.3.8",
"symfony/yaml": "^4.3",
"titasgailius/search-relations": "^1.0",
"true/punycode": "^2.1",
"twilio/sdk": "^6.10",
"unicodeveloper/laravel-password": "1.0.*",
"voiceit-php/voiceit2": "^3.0",
"whoops/soap": "^1.0",
"wildbit/swiftmailer-postmark": "^3.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.3",
"beyondcode/laravel-er-diagram-generator": "^0.2.2",
"coderello/laravel-populated-factory": "^0.3.0",
"facade/ignition": "^1.16",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0",
"squizlabs/php_codesniffer": "^3.3"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"scripts": {
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Windows计算机上的全局Composer.json.
{
"require": {
"squizlabs/php_codesniffer": "^3.4",
"laravel/installer": "^3.0",
"cretueusebiu/valet-windows": "^2.1"
}
}
我只运行了composer install
,并在全新安装时获得此文件。我的代码库最初是在Composer v1上构建的,我正在尝试将命名空间迁移到PSR-4更新,结果遇到了这个问题。
如果我运行composer install --no-plugins
,我就可以运行。但是,我找不到可以安装插件的位置。我在我的laravel应用程序根目录中运行了此程序。
输出
➜ ... git:(develop) ✗ rm -rf vendor
➜ ... git:(develop) ✗ composer clear-cache
Cache directory does not exist (cache-vcs-dir):
Clearing cache (cache-repo-dir): /home/vagrant/.cache/composer/repo
Clearing cache (cache-files-dir): /home/vagrant/.cache/composer/files
Clearing cache (cache-dir): /home/vagrant/.cache/composer
All caches cleared.
➜ ... git:(develop) ✗ rm composer.lock
➜ ... git:(develop) ✗ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 259 installs, 0 updates, 0 removals
- Locking arcanedev/log-viewer (5.2.0)
- Locking arcanedev/support (5.2.0)
- Locking asvae/laravel-api-tester (2.0.11)
- Locking aws/aws-sdk-php (3.166.2)
- Locking barryvdh/laravel-debugbar (v3.5.1)
- Locking bepsvpt/secure-headers (5.6.0)
- Locking beyondcode/laravel-er-diagram-generator (0.2.3)
- Locking beyondcode/laravel-websockets (1.9.0)
- Locking cache/adapter-common (1.1.0)
- Locking cache/tag-interop (1.0.1)
- Locking cboden/ratchet (v0.4.3)
- Locking coderello/laravel-populated-factory (0.3.2)
- Locking commerceguys/intl (v1.0.7)
- Locking composer/package-versions-deprecated (1.8.0)
- Locking defuse/php-encryption (v2.2.1)
- Locking divineomega/do-file-cache (v2.0.6)
- Locking divineomega/do-file-cache-psr-6 (v2.0.1)
- Locking divineomega/laravel-password-exposed-validation-rule (v2.3.0)
- Locking divineomega/password_exposed (v3.1.1)
- Locking divineomega/psr-18-guzzle-adapter (v1.1.0)
- Locking dnoegel/php-xdg-base-dir (v0.1.1)
- Locking doctrine/annotations (1.11.1)
- Locking doctrine/cache (1.10.2)
- Locking doctrine/collections (1.6.7)
- Locking doctrine/common (3.1.0)
- Locking doctrine/couchdb (1.0.0-beta4)
- Locking doctrine/dbal (2.12.1)
- Locking doctrine/event-manager (1.1.1)
- Locking doctrine/inflector (2.0.3)
- Locking doctrine/instantiator (1.4.0)
- Locking doctrine/lexer (1.2.1)
- Locking doctrine/orm (2.8.1)
- Locking doctrine/persistence (2.1.0)
- Locking dragonmantank/cron-expression (v2.3.1)
- Locking egulias/email-validator (2.1.24)
- Locking elasticsearch/elasticsearch (v6.7.2)
- Locking evenement/evenement (v3.0.1)
- Locking facade/flare-client-php (1.3.7)
- Locking facade/ignition (1.16.4)
- Locking facade/ignition-contracts (1.0.2)
- Locking fideloper/proxy (4.4.1)
- Locking filp/whoops (2.9.1)
- Locking firebase/php-jwt (v5.2.0)
- Locking fzaninotto/faker (v1.9.1)
- Locking giggsey/libphonenumber-for-php (8.12.14)
- Locking giggsey/locale (1.9)
- Locking gluedev/laravel-stackdriver (0.1.2)
- Locking google/auth (v1.14.3)
- Locking google/cloud (v0.96.0)
- Locking google/common-protos (0.1.0)
- Locking google/gax (0.38.2)
- Locking google/grpc-gcp (0.1.5)
- Locking google/protobuf (v3.14.0)
- Locking graham-campbell/guzzle-factory (v3.0.4)
- Locking graylog2/gelf-php (1.6.5)
- Locking grpc/grpc (1.34.0)
- Locking guzzle/guzzle (v3.8.1)
- Locking guzzlehttp/guzzle (6.5.5)
- Locking guzzlehttp/promises (1.4.0)
- Locking guzzlehttp/psr7 (1.7.0)
- Locking guzzlehttp/ringphp (1.1.1)
- Locking guzzlehttp/streams (3.0.0)
- Locking hamcrest/hamcrest-php (v2.0.1)
- Locking hoa/consistency (1.17.05.02)
- Locking hoa/console (3.17.05.02)
- Locking hoa/event (1.17.01.13)
- Locking hoa/exception (1.17.01.16)
- Locking hoa/file (1.17.07.11)
- Locking hoa/iterator (2.17.01.10)
- Locking hoa/protocol (1.17.01.14)
- Locking hoa/stream (1.17.02.21)
- Locking hoa/ustring (4.17.01.16)
- Locking ircmaxell/random-lib (v1.2.0)
- Locking ircmaxell/security-lib (v1.1.0)
- Locking jakub-onderka/php-console-color (v0.2)
- Locking jakub-onderka/php-console-highlighter (v0.4)
- Locking kitetail/zttp (v0.6.0)
- Locking ktamas77/firebase-php (2.2.2)
- Locking laminas/laminas-diactoros (2.5.0)
- Locking laminas/laminas-zendframework-bridge (1.1.1)
- Locking langleyfoxall/laravel-nist-password-rules (v4.3.0)
- Locking laravel-notification-channels/twilio (3.1.2)
- Locking laravel/framework (v6.18.22)
- Locking laravel/passport (v9.3.1)
- Locking laravel/tinker (v2.5.0)
- Locking lcobucci/jwt (3.4.1)
- Locking league/commonmark (1.5.7)
- Locking league/csv (9.6.1)
- Locking league/event (2.2.0)
- Locking league/flysystem (1.1.3)
- Locking league/flysystem-aws-s3-v3 (1.0.29)
- Locking league/flysystem-azure-blob-storage (0.1.6)
- Locking league/flysystem-cached-adapter (1.1.0)
- Locking league/flysystem-rackspace (1.0.5)
- Locking league/flysystem-sftp (1.0.22)
- Locking league/flysystem-webdav (1.0.9)
- Locking league/flysystem-ziparchive (1.0.3)
- Locking league/fractal (0.19.2)
- Locking league/iso3166 (3.0.0)
- Locking league/mime-type-detection (1.5.1)
- Locking league/oauth2-server (8.2.3)
- Locking maximebf/debugbar (v1.16.4)
- Locking microsoft/azure-storage-blob (1.5.1)
- Locking microsoft/azure-storage-common (1.5.0)
- Locking mikemccabe/json-patch-php (0.1.0)
- Locking mockery/mockery (1.4.2)
- Locking mollie/polyfill-libsodium (v1.1.1)
- Locking monolog/monolog (1.25.5)
- Locking mtdowling/jmespath.php (2.6.0)
- Locking myclabs/deep-copy (1.10.2)
- Locking nesbot/carbon (2.42.0)
- Locking nexmo/client (1.9.1)
- Locking nexmo/client-core (1.8.1)
- Locking nikic/php-parser (v4.10.3)
- Locking nunomaduro/collision (v3.1.0)
- Locking nyholm/psr7 (1.3.2)
- Locking opencensus/opencensus (v0.5.2)
- Locking opencensus/opencensus-exporter-stackdriver (v0.1.0)
- Locking opis/closure (3.6.1)
- Locking paragonie/certainty (v2.8.0)
- Locking paragonie/constant_time_encoding (v2.4.0)
- Locking paragonie/random_compat (v9.99.99)
- Locking paragonie/sodium_compat (v1.14.0)
- Locking pda/pheanstalk (v4.0.3)
- Locking phar-io/manifest (2.0.1)
- Locking phar-io/version (3.0.3)
- Locking php-amqplib/php-amqplib (v2.12.1)
- Locking php-console/php-console (3.1.8)
- Locking php-http/discovery (1.13.0)
- Locking php-http/guzzle6-adapter (v1.1.1)
- Locking php-http/httplug (v1.1.0)
- Locking php-http/message-factory (v1.0.2)
- Locking php-http/promise (1.1.0)
- Locking phpdocumentor/graphviz (1.0.4)
- Locking phpdocumentor/reflection-common (2.2.0)
- Locking phpdocumentor/reflection-docblock (5.2.2)
- Locking phpdocumentor/type-resolver (1.4.0)
- Locking phpoption/phpoption (1.7.5)
- Locking phpseclib/mcrypt_compat (1.0.11)
- Locking phpseclib/phpseclib (2.0.29)
- Locking phpspec/prophecy (1.12.1)
- Locking phpunit/php-code-coverage (7.0.14)
- Locking phpunit/php-file-iterator (2.0.3)
- Locking phpunit/php-invoker (2.0.1)
- Locking phpunit/php-text-template (1.2.1)
- Locking phpunit/php-timer (2.1.3)
- Locking phpunit/php-token-stream (4.0.4)
- Locking phpunit/phpunit (8.5.13)
- Locking predis/predis (v1.1.6)
- Locking propaganistas/laravel-intl (3.1.0)
- Locking propaganistas/laravel-phone (4.2.7)
- Locking psr/cache (1.0.1)
- Locking psr/container (1.0.0)
- Locking psr/event-dispatcher (1.0.0)
- Locking psr/http-client (1.0.1)
- Locking psr/http-factory (1.0.1)
- Locking psr/http-message (1.0.1)
- Locking psr/log (1.1.3)
- Locking psr/simple-cache (1.0.1)
- Locking psy/psysh (v0.10.5)
- Locking punic/punic (3.5.1)
- Locking pusher/pusher-php-server (v4.1.4)
- Locking rackspace/php-opencloud (v1.16.0)
- Locking ralouphie/getallheaders (3.0.3)
- Locking ramsey/uuid (3.9.3)
- Locking ramsey/uuid-doctrine (1.6.0)
- Locking ratchet/rfc6455 (v0.3)
- Locking rbdwllr/reallysimplejwt (2.1.0)
- Locking react/cache (v1.1.0)
- Locking react/dns (v1.4.0)
- Locking react/event-loop (v1.1.1)
- Locking react/http (v1.2.0)
- Locking react/promise (v2.8.0)
- Locking react/promise-stream (v1.2.0)
- Locking react/promise-timer (v1.6.0)
- Locking react/socket (v1.6.0)
- Locking react/stream (v1.1.1)
- Locking ringcentral/psr7 (1.3.0)
- Locking rize/uri-template (0.3.2)
- Locking rollbar/rollbar (v1.8.1)
- Locking ruflin/elastica (6.1.1)
- Locking sabre/dav (4.1.3)
- Locking sabre/event (5.1.2)
- Locking sabre/http (5.1.1)
- Locking sabre/uri (2.2.1)
- Locking sabre/vobject (4.3.3)
- Locking sabre/xml (2.2.3)
- Locking scrivo/highlight.php (v9.18.1.5)
- Locking sebastian/code-unit-reverse-lookup (1.0.2)
- Locking sebastian/comparator (3.0.3)
- Locking sebastian/diff (3.0.3)
- Locking sebastian/environment (4.2.4)
- Locking sebastian/exporter (3.1.3)
- Locking sebastian/global-state (3.0.1)
- Locking sebastian/object-enumerator (3.0.4)
- Locking sebastian/object-reflector (1.1.2)
- Locking sebastian/recursion-context (3.0.1)
- Locking sebastian/resource-operations (2.0.2)
- Locking sebastian/type (1.1.4)
- Locking sebastian/version (2.0.1)
- Locking spatie/dropbox-api (1.16.1)
- Locking spatie/flysystem-dropbox (1.2.3)
- Locking spatie/fractalistic (2.9.1)
- Locking spatie/laravel-fractal (5.8.0)
- Locking spatie/laravel-permission (3.18.0)
- Locking squizlabs/php_codesniffer (3.5.8)
- Locking swiftmailer/swiftmailer (v6.2.3)
- Locking symfony/browser-kit (v4.4.17)
- Locking symfony/cache (v5.2.0)
- Locking symfony/cache-contracts (v2.2.0)
- Locking symfony/config (v4.4.17)
- Locking symfony/console (v4.4.17)
- Locking symfony/css-selector (v5.2.0)
- Locking symfony/debug (v4.4.17)
- Locking symfony/dependency-injection (v4.4.17)
- Locking symfony/deprecation-contracts (v2.2.0)
- Locking symfony/dom-crawler (v4.4.17)
- Locking symfony/error-handler (v4.4.17)
- Locking symfony/event-dispatcher (v4.4.17)
- Locking symfony/event-dispatcher-contracts (v1.1.9)
- Locking symfony/expression-language (v4.4.17)
- Locking symfony/filesystem (v5.2.0)
- Locking symfony/finder (v4.4.17)
- Locking symfony/http-client-contracts (v2.3.1)
- Locking symfony/http-foundation (v4.4.17)
- Locking symfony/http-kernel (v4.4.17)
- Locking symfony/lock (v4.4.17)
- Locking symfony/mime (v5.2.0)
- Locking symfony/polyfill-ctype (v1.20.0)
- Locking symfony/polyfill-iconv (v1.20.0)
- Locking symfony/polyfill-intl-idn (v1.20.0)
- Locking symfony/polyfill-intl-normalizer (v1.20.0)
- Locking symfony/polyfill-mbstring (v1.20.0)
- Locking symfony/polyfill-php72 (v1.20.0)
- Locking symfony/polyfill-php73 (v1.20.0)
- Locking symfony/polyfill-php80 (v1.20.0)
- Locking symfony/process (v4.4.17)
- Locking symfony/psr-http-message-bridge (v2.0.2)
- Locking symfony/routing (v4.4.17)
- Locking symfony/service-contracts (v2.2.0)
- Locking symfony/translation (v4.3.8)
- Locking symfony/translation-contracts (v1.1.10)
- Locking symfony/var-dumper (v4.4.17)
- Locking symfony/var-exporter (v5.2.0)
- Locking symfony/yaml (v4.4.17)
- Locking theseer/tokenizer (1.2.0)
- Locking tightenco/collect (v5.8.38)
- Locking tijsverkoyen/css-to-inline-styles (2.2.3)
- Locking titasgailius/search-relations (1.0.6)
- Locking true/punycode (v2.1.1)
- Locking twilio/sdk (6.14.0)
- Locking umpirsky/country-list (2.0.6)
- Locking umpirsky/locale-list (1.0.0)
- Locking unicodeveloper/laravel-password (1.0.3)
- Locking vlucas/phpdotenv (v3.6.7)
- Locking voiceit-php/voiceit2 (3.6.0)
- Locking webmozart/assert (1.9.1)
- Locking whoops/soap (1.0.0)
- Locking wildbit/swiftmailer-postmark (3.3.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 259 installs, 0 updates, 0 removals
- Downloading composer/package-versions-deprecated (1.8.0)
- Downloading psr/log (1.1.3)
- Downloading symfony/polyfill-ctype (v1.20.0)
- Downloading phpoption/phpoption (1.7.5)
- Downloading vlucas/phpdotenv (v3.6.7)
....
- Downloading symfony/var-exporter (v5.2.0)
- Downloading symfony/cache (v5.2.0)
- Downloading symfony/expression-language (v4.4.17)
- Downloading symfony/lock (v4.4.17)
- Downloading symfony/yaml (v4.4.17)
- Downloading titasgailius/search-relations (1.0.6)
- Downloading true/punycode (v2.1.1)
- Downloading unicodeveloper/laravel-password (1.0.3)
- Downloading voiceit-php/voiceit2 (3.6.0)
- Downloading whoops/soap (1.0.0)
- Downloading wildbit/swiftmailer-postmark (3.3.0)
- Installing composer/package-versions-deprecated (1.8.0): Extracting archive
Plugin initialization failed (include(/home/vagrant/.../vendor/composer/package-versions-deprecated/src/PackageVersions/Installer.php): failed to open stream: No such file or directory), uninstalling plugin
- Removing composer/package-versions-deprecated (1.8.0)
Install of composer/package-versions-deprecated failed
[RuntimeException]
Could not delete /home/vagrant/.../vendor/composer/package-versions-deprecated/src:
解决方案
讨论here和here指出这是VirtualBox的问题,特别是vboxfs
,以及主机操作系统没有完全准备好新创建的文件(即正在解压缩的压缩文件)。
存在一种解决方法,在压缩后延迟似乎是有效的。贷方为rpkamp。
以下内容适用于我(Laravel Homestead项目、php7.4、VirtualBox和流浪汉):
1-在某个位置创建名为unzip的脚本。可能位于您的项目的根目录(Composer.json所在的位置)。如果存储速度较慢(如硬盘),请调整计时,如sleep 0.9
。
#!/bin/sh
/usr/bin/unzip "$@"
sleep 0.2
2-进入流浪者实例(此步骤之后的所有内容都在其中发生):
vagrant ssh
3-将脚本复制到usr/local/bin:
sudo cp /path/to/unzip /usr/local/bin
4-允许文件为可执行文件,并显示:
sudo chmod +x /usr/local/bin/unzip
5-现在尝试在您的站点根目录中再次运行composer
:
composer install
理想情况下,此修复是临时的,将来会删除。
也请记住您的部署环境;它是否也需要此脚本?
相关文章