我尝试使用以下方法安装 symfony-cmf-standard:
composer.phar create-project symfony-cmf/standard-edition symfony-cmf-standard/ --stability=dev
但是我收到以下错误:
Could not open input file: app/console
Script sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
[RuntimeException]
An error occured when executing the cache:clear --no-warmup
我正在以管理员身份运行命令,因此这不应该是权限问题。
最佳答案
当我们使用命令时它给出了错误,
composer.phar create-project symfony-cmf/standard-edition symfony-cmf-standard/ --stability=dev
它创建 symfony-cmf-standard 文件夹作为项目文件夹并开始安装依赖项,但在这期间它尝试使用
清除缓存php app/console cache:clear
但由于当前位置在项目文件夹之外,因此无法找到应用程序/控制台,因此失败。
现在,如果我们将目录更改为项目文件夹内并使用命令手动清除缓存
php app/console cache:clear
它会清除缓存,然后我们需要再次使用
更新依赖项php composer.phar update
它对我有用。
关于php - 安装 symfony-cmf-standard 时出现 "An error occured when executing the cache:clear --no-warmup",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14893082/