2017-10-01 8 views
0

를 설치 내가 PHP 작곡가 큰 문제를 가지고,이 명령을PHP 작곡가 문제

php composer.phar install 

를 실행하지만 나에게

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception 


    [RuntimeException] 
    An error occurred when executing the "'cache:clear --no-warmup'" command: 
    PHP Warning: require_once(/var/www/lcp-api/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/lcp-api/app/console on line 10 
    PHP Fatal error: require_once(): Failed opening required '/var/www/lcp-api/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/ 
    lcp-api/app/console on line 10 
    . 

내가 파일 composer.json를 확인이 오류를 보여 것 같다 모든 것이 정상입니다.

"post-install-cmd": [ 
     "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" 
    ], 
    "post-update-cmd": [ 
     "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" 
    ] 
    }, 

이 오류가 발생하는 이유는 무엇입니까?

는 진심으로

+0

'/ var/www/lcp-api/app/bootstrap.php.cache'파일이 있습니까? – rickdenhaan

+0

아니요,이 파일이 없습니다. 나는 다른 포스트에서 체크인하고 Symphony가 그것을 생성한다고 말합니다. –

답변

1

당신의 bootstrap.php.cache 파일이없는 것 같다. 이것은 때때로 Symfony에서 발생할 수 있습니다.

install 대신 composer update을 실행하면 이어야 재생성되어야합니다. 실행에 의해 생산 모드로 사용자 환경을 강제로 시도 할 수

php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php 

그 또한 작동하지 않는 경우 문제가 해결되지 않으면, 당신은 당신의 프로젝트의 루트에서이 명령을 실행하여 수동으로 생성 할 수 있습니다 작곡가는 다음과 같습니다 :

SYMFONY_ENV=prod composer install 

개발 환경에서 그렇게하면 디버그 모드가 비활성화됩니다. 이렇게하면 bootstrap.php.cache 파일이 생성되므로 dev 모드에서 composer를 다시 실행할 수 있습니다.

+0

두 번째 명령을 실행할 때이 "v2.1.62"가 무엇을 의미하는지 알 수 있습니까? –

+0

이상하게 들리면,'build_bootstrap'는 모든 것이 잘 되었다면 어떤 결과도 출력해서는 안됩니다. Symfony 또는 Sensio 버전 번호는 2.1.x 버전이 62 위로 올라 가지 않기 때문에 아닙니다. Symfony의 최신 버전을 사용하고 있습니까? 우리는 버전 3.3.9 (또는 2에 머물러 있다면 2.8.27)입니다. 어느 버전에서든 해당 동작을 복제 할 수 없습니다. – rickdenhaan