月: 2013年4月

Symfony2のインストールに失敗した:[ERROR 3070] complex type ‘service’: The content model is not determinist.

自前のサーバにSymfony2をインストールしようとして失敗したのでメモ。
たぶん同じことになる人が出てくると思うので。。。

$  php composer.phar create-project symfony/framework-standard-edition webroot 2.2.1
・
・
・

  [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
  Unable to parse file "/home/takeuchi/public_html/symfony2/webroot/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/../Resources/config/web.xml".

  [InvalidArgumentException]
  [ERROR 3070] complex type 'service': The content model is not determinist. (in file:////home/takeuchi/public_html/symfony2/webroot/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 75, column 0)
  [ERROR 3070] complex type 'argument': The content model is not determinist. (in file:////home/takeuchi/public_html/symfony2/webroot/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 131, column 0)
  [ERROR 3070] complex type 'call': The content model is not determinist. (in file:////home/takeuchi/public_html/symfony2/webroot/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd - line 144, column 0)

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.

調べてみると同様の現象が起きてる人を発見。
[ERROR 3070] complex type ‘service’: The content model is not determinist.

どうもyum-cronでlibxml2のバージョンがあがったことが原因みたい。。。

コメントにあるように以下のコマンドを発行

# yum downgrade libxml2-2.6.26-2.1.21.el5_9.1
# chkconfig yum-cron off

その後再度
$ php composer.phar create-project symfony/framework-standard-edition webroot 2.2.1
を実行したら無事にインストールできた。

表側でエラーがでた場合はapacheの再起動が必要だったりする。

Symfony側の話しではなかったみたいですな。

※エラーはインストールに限らずapp/consoleコマンドのときにも発生してました。

■参考URL
新しいlibxml2 (2.6.26-2.1.21.el5_9.2) がバギーな様子