![](/img/trans.png)
[英]An error occurred when executing the “”cache:clear --no-warmup“” command
[英]“An error occured when executing the cache:clear --no-warmup” while installing symfony-cmf-standard
我試圖使用以下方法安裝 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 致命錯誤:找不到類 'DOMDocument'...”
工作后:
install php-xml
(我想可以選擇使用這個選項編譯)/etc/php.ini
設置date.timezone
在我的 php7.0 這邊,我必須安裝:
php7.0-mbstring
php7.0-xml
然后它起作用了:)
這是因為 DoctrinePHPCRBundle 中的以下錯誤: https : //github.com/doctrine/DoctrinePHPCRBundle/issues/17
要修復它,請編輯symfony-cmf-standard
文件夾中的文件vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Resources/config/odm.xml
並替換以下行:
<parameter key="doctrine_phpcr.odm.metadata.driver_chain.class">Doctrine\ODM\PHPCR\Mapping\Driver\DriverChain</parameter>
有了這個:
<parameter key="doctrine_phpcr.odm.metadata.driver_chain.class">Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain</parameter>
現在將composer.phar
復制到symfony-cmf-standard
文件夾中,並以管理員權限運行命令:
php composer.phar update
確保安裝了這些:
php-mb
或php54w-mbstring
或php55w-mbstring
php-xml
或php54-xml
或php55w-xml
在這個問題上花了幾個小時后,在 FreeBSD 下,您還需要安裝 port textproc/php80-xmlreader
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.