我正在尝试使用 capifony 将 Symfony2 项目部署到服务器,但出现此错误:
* 2013-06-25 16:22:19 executing `symfony:assets:install'
--> Installing bundle's assets
* executing "sh -c 'cd /home/user1/releases/20130625142202 && php app/console assets:install web --env=prod --no-debug'"
servers: ["1xx"]
[1xx] executing command
** [out :: 1xx]
** [out :: 1xx] Warning: require(/home/user1/releases/20130625142202/app/../vendor/autoload.php): failed to open stream: No such file or directory in /home/user1/releases/20130625142202/app/autoload.php on line 14
** [out :: 1xx]
** [out :: 1xx] Fatal error: require(): Failed opening required '/home/user1/releases/20130625142202/app/../vendor/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user1/releases/20130625142202/app/autoload.php on line 14
command finished in 369ms
*** [deploy:update_code] rolling back
这是我的输出:
- 2013-06-25 16:51:49 执行
symfony:composer:get' <ul> <li>executing "if [ -e /home/user/releases/20130625145137/composer.phar ]; then echo 'true'; fi" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 488ms --> Updating Composer</li> <li>executing "sh -c 'cd /home/user/releases/20130625145137 && php composer.phar self-update'" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 377ms --> Updating Composer dependencies</li> <li>executing "sh -c 'cd /home/user/releases/20130625145137 && php composer.phar update --no-scripts --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress'" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 390ms</li> <li>2013-06-25 16:51:50 executing
symfony:bootstrap:build' --> 构建引导文件 - 执行“if [ -e /home/user/releases/20130625145137/bin/build_bootstrap ]; 然后回显'true'; fi”服务器:[“xx.xxx.xx.xx”] [xx.xxx.xx.xx]执行命令命令在 336 毫秒内完成
- 执行“sh -c 'cd /home/user/releases/20130625145137 && test -f vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php && php vendor/sensio/distribution-bundle/ Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php 应用程序 || echo 'vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php 未找到,已跳过''" 服务器:[" xx.xxx.xx.xx"] [xx.xxx.xx.xx] 执行命令 ** [out :: xx.xxx.xx.xx] vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/ bin/build_bootstrap.php 命令在 392 毫秒内完成
- 2013-06-25 16:51:51 执行
symfony:composer:dump_autoload' --> Dumping an optimized autoloader</li> <li>executing "sh -c 'cd /home/user/releases/20130625145137 && php composer.phar dump-autoload --optimize'" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 417ms</li> <li>2013-06-25 16:51:52 executing
symfony:assets:install'--> 安装 bundle 的资产 - 执行 "sh -c 'cd /home/user/releases/20130625145137 && php app/console assets:install web --env=prod --no-debug'" 服务器:["xx.xxx.xx.xx"] [ xx.xxx.xx.xx] 执行命令 ** [out :: xx.xxx.xx.xx] ** [out :: xx.xxx.xx.xx] 警告:require(/home/user/releases/20130625145137 /app/../vendor/autoload.php):无法打开流:第 14 行的 /home/user/releases/20130625145137/app/autoload.php 中没有这样的文件或目录 ** [out :: xx.xxx .xx.xx] ** [out :: xx.xxx.xx.xx] 致命错误:require():打开失败需要'/home/user/releases/20130625145137/app/../vendor/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') 在 /home/user/releases/20130625145137/app/autoload.php 第 14 行命令在 417 毫秒内完成 * [deploy:update_code ] 滚回来
- 执行 "rm -rf /home/user/releases/20130625145137; true" 服务器:["xx.xxx.xx.xx"] [xx.xxx.xx.xx] 执行命令