将laravel从6.03更新到6.18时出错

rta7y2nd  于 12个月前  发布在  其他
关注(0)|答案(5)|浏览(72)

我有这个错误当试图升级我的Laravel从6.03到6.18无法删除D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate:这可能是由于防病毒软件或Windows搜索索引器在分析文件时锁定了文件

PS D:\xampp\htdocs\XXXXX> composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 35 updates, 0 removals
  - Updating laravel/framework (v6.0.3 => v6.18.35):     Update failed (Could not delete D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate:
This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed)
    Would you like to try reinstalling the package instead [yes]?
  - Removing laravel/framework (v6.0.3)

  [RuntimeException]
  Could not delete D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate:
  This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

PS D:\xampp\htdocs\BaladyFreshFarm>

字符串

tzxcd3kk

tzxcd3kk1#

您可以尝试手动删除D:\xampp\htdocs\BaladyFreshFarm\vendor/laravel/framework\src\Illuminate。如果这不起作用,请尝试重新启动并关闭防病毒,然后重试。

jhdbpxl9

jhdbpxl92#

同样的事情也发生在我身上,经过几个小时的调试,我发现:

  • 确保您的vscode或powershell或cmd具有“管理”权限。
  • 确保您的Web服务器工作正常。
    不要做的事情:

在我的情况下,没有什么错与代理和所有它只是许可和工作的Web服务器。但是我必须重新安装XAMPP才能正确解决这个问题,因为我在调试时篡改了一些文件

jslywgbw

jslywgbw3#

像管理员一样运行IDE或终端,然后重试。

4nkexdtk

4nkexdtk4#

我今天遇到了这个问题。删除供应商文件夹,然后执行composer install。那应该能解决问题。

dfuffjeb

dfuffjeb5#

我是如何解决的:
1.以管理员身份打开您的CMD

  1. cd到项目名称中
    1.转到您的防病毒软件,然后单击设置,选择例外
    1.然后添加路径C:\xampp\htdocs并单击ok
    1.回到你的CMD和类型 composer 需要laravel/ui.......这对我来说很有效

相关问题