php 安装 symfony-cmf-standard 时“执行缓存时发生错误:clear --no-warmup”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14893082/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"An error occured when executing the cache:clear --no-warmup" while installing symfony-cmf-standard
提问by vishal
I was trying to install symfony-cmf-standard using:
我试图使用以下方法安装 symfony-cmf-standard:
composer.phar create-project symfony-cmf/standard-edition symfony-cmf-standard/ --stability=dev
But I am getting the following error:
但我收到以下错误:
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
I am running the command as an Administrator so it should not be a permission issue.
我以管理员身份运行命令,所以它不应该是权限问题。
回答by vishal
It gives error as when we use the command,
当我们使用命令时,它会出错,
composer.phar create-project symfony-cmf/standard-edition symfony-cmf-standard/ --stability=dev
It creates symfony-cmf-standard folder as a project folder and starts installing dependencies but in between it tries to clear cache using
它创建 symfony-cmf-standard 文件夹作为项目文件夹并开始安装依赖项,但在两者之间它尝试使用清除缓存
php app/console cache:clear
But as the current location is outside of the project folder it can not locate app/console so it fails.
但是由于当前位置在项目文件夹之外,它无法找到应用程序/控制台,所以它失败了。
Now if we change the directory to inside the project folder and clear cache manually by using command
现在,如果我们将目录更改为项目文件夹内并使用命令手动清除缓存
php app/console cache:clear
It clears cache and then we need to again update dependencies using
它清除缓存,然后我们需要再次使用更新依赖项
php composer.phar update
It worked for me.
它对我有用。
回答by Alex
I've got an error cut also in the same case: "...PHP Fatal error: Class 'DOMDocument' not found..."
在同样的情况下,我也有一个错误:“...PHP 致命错误:找不到类 'DOMDocument'...”
Works after:
工作后:
install php-xml(can be optionally compiled with this option I suppose)- set
date.timezonein/etc/php.ini
install php-xml(我想可以选择使用此选项编译)- 设置
date.timezone在/etc/php.ini
回答by Ssh-uunen
On my side with php7.0 I had to install :
在我的 php7.0 这边,我必须安装:
php7.0-mbstringphp7.0-xml
php7.0-mbstringphp7.0-xml
Then it worked :)
然后它起作用了:)
回答by cheesemacfly
This happens because of the following bug in DoctrinePHPCRBundle: https://github.com/doctrine/DoctrinePHPCRBundle/issues/17
这是因为 DoctrinePHPCRBundle 中的以下错误:https: //github.com/doctrine/DoctrinePHPCRBundle/issues/17
To fix it, edit the file vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Resources/config/odm.xmlinside your symfony-cmf-standardfolder and replace this line:
为了解决这个问题,编辑该文件vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Resources/config/odm.xml的内部symfony-cmf-standard文件夹,替换该行:
<parameter key="doctrine_phpcr.odm.metadata.driver_chain.class">Doctrine\ODM\PHPCR\Mapping\Driver\DriverChain</parameter>
With this one:
有了这个:
<parameter key="doctrine_phpcr.odm.metadata.driver_chain.class">Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain</parameter>
Now copy composer.pharinside your symfony-cmf-standardfolder and run with administrator privileges the command:
现在复制composer.phar到您的symfony-cmf-standard文件夹中并以管理员权限运行以下命令:
php composer.phar update
回答by Michael Stramel
Make sure these are installed:
确保安装了这些:
php-mborphp54w-mbstringorphp55w-mbstringphp-xmlorphp54-xmlorphp55w-xml
php-mb或php54w-mbstring或php55w-mbstringphp-xml或php54-xml或php55w-xml

