1

我有一个在本地运行良好的 Symfony 项目,但是当我把它放在服务器上并发出命令时,composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader我每次都会遇到这个错误


[c1131570c@web44 falah]$ rm -rf vendor && composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 78 installs, 0 updates, 0 removals
  - Installing symfony/flex (v1.4.5): Loading from cache
  - Installing doctrine/cache (v1.8.0): Loading from cache
  - Installing doctrine/collections (v1.6.2): Loading from cache
  - Installing doctrine/event-manager (v1.0.0): Loading from cache
  - Installing doctrine/lexer (1.1.0): Loading from cache
  - Installing doctrine/annotations (v1.7.0): Loading from cache
  - Installing doctrine/reflection (v1.0.0): Loading from cache
  - Installing egulias/email-validator (2.1.10): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.12.0): Loading from cache
  - Installing twig/twig (v2.11.3): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing psr/cache (1.0.1): Loading from cache
Script cache:clear returned with error code 255
!!
!!  Fatal error: Uncaught Error: Class 'Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle' not found in /home/c1131570c/public_html/falah/src/Kernel.php:23
!!  Stack trace:
!!  #0 /home/c1131570c/public_html/falah/vendor/symfony/http-kernel/Kernel.php(424): App\Kernel->registerBundles()
!!  #1 /home/c1131570c/public_html/falah/vendor/symfony/http-kernel/Kernel.php(130): Symfony\Component\HttpKernel\Kernel->initializeBundles()
!!  #2 /home/c1131570c/public_html/falah/vendor/symfony/framework-bundle/Console/Application.php(65): Symfony\Component\HttpKernel\Kernel->boot()
!!  #3 /home/c1131570c/public_html/falah/vendor/symfony/console/Application.php(145): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
!!  #4 /home/c1131570c/public_html/falah/bin/console(42): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
!!  #5 {main}
!!    thrown in /home/c1131570c/public_html/falah/src/Kernel.php on line 23
!!
Script @auto-scripts was called via post-install-cmd

我尝试使用 php 7.3 安装服务器

4

0 回答 0