Could not delete ....
When doing a fresh composer install (with applying patches using `cwaegans/composer-patches`) everything runs fine.
Running `composer install` for the second time, applying the patches results in:
```
5361eb138b29:/var/www/html$ composer install
Gathering patches from patch file.
Removing package shopware/core so that it can be re-installed and re-patched.
- Removing shopware/core (v6.7.1.2)
In Filesystem.php line 333:
Could not delete /var/www/html/vendor/shopware/core/Framework/DataAbstractionLayer/Field/Flag:
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
```
A third time, applying the patches results in:
```
5361eb138b29:/var/www/html$ composer install
Gathering patches from patch file.
Removing package shopware/core so that it can be re-installed and re-patched.
- Removing shopware/core (v6.7.1.2)
In Filesystem.php line 333:
Could not delete /var/www/html/vendor/shopware/core/Framework/DependencyInjection/CompilerPass:
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
```
A fourth time, applying the patches results in:
```
5361eb138b29:/var/www/html$ composer install
Gathering patches from patch file.
Removing package shopware/core so that it can be re-installed and re-patched.
- Removing shopware/core (v6.7.1.2)
In Filesystem.php line 333:
Could not delete /var/www/html/vendor/shopware/core/Migration/V6_3:
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
```
The fifth time, applying the patches results in:
```
5361eb138b29:/var/www/html$ composer install
Gathering patches from patch file.
Removing package shopware/core so that it can be re-installed and re-patched.
- Removing shopware/core (v6.7.1.2)
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 2 installs, 0 updates, 0 removals
Gathering patches from patch file.
Gathering patches for dependencies. This might take a minute.
- Installing shopware/core (v6.7.1.2): Extracting archive
- Applying patches for shopware/core
patch/patch-x.patch (MSH-2447)
Could not apply patch! Skipping. The error was: Cannot apply patch patch/patch-x.patch
Generating optimized autoload files
152 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Run composer recipes at any time to see the status of your Symfony recipes.
Executing script assets:install [KO]
[KO]
Script assets:install returned with error code 1
!! Copying files for bundle: FrameworkBundle
!! Copying files for bundle: TwigBundle
!! Copying files for bundle: MonologBundle
!! Copying files for bundle: DebugBundle
!! Copying files for bundle: Framework
!! Copying files for bundle: System
!! Copying files for bundle: Content
!! Copying files for bundle: Checkout
!! Copying files for bundle: Maintenance
!! Copying files for bundle: Profiling
!! Copying files for bundle: Service
!! Copying files for bundle: Administration
!!
!! In UnableToDeleteDirectory.php line 27:
!!
!! Unable to delete directory located at: bundles/administration. Unable to de
!! lete file at /var/www/html/public/bundles/administration/administration/ass
!! ets
!!
!!
!! assets:install [-f|--force]
!!
!!
Script @auto-scripts was called via post-install-cmd
```
Does this have something to do with the image? Earlier everything worked just fine. Trying to use an older container doesn't help, but I'm not sure if I'm using the right one.
关闭于 2025-10-01 1 条评论