【问题标题】:composer: RuntimeException作曲家:运行时异常
【发布时间】:2015-06-05 11:11:19
【问题描述】:

我正在尝试通过 composer 安装 Typo3-Neos。

我按照列出的说明进行操作:

  • curl -s https://getcomposer.org/installer | php
    下载作曲家
  • php composer.phar self-update
    已经是最新的了
  • php composer.phar create-project -s beta typo3/neos-base-distribution Neos-2.0 尝试下载 Typo3-Neos

在最后一步显示以下消息:

# php composer.phar create-project -s beta typo3/neos base-distribution Neos-2.0
Installing typo3/neos-base-distribution (2.0.0-beta2)
 - Installing typo3/neos-base-distribution (2.0.0-beta2)
   Cloning f344c0bdc9b2f83341f443c66d460204eaa0afd2

Created project in Neos-2.0
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing composer/installers (v1.0.21)
   Loading from cache

Class TYPO3\Flow\Composer\InstallerScripts is not autoloadable, can not call post-package-install script
 - Installing symfony/console (v2.7.0)
   Loading from cache

Class TYPO3\Flow\Composer\InstallerScripts is not autoloadable, can not call post-package-install script
 - Installing symfony/dom-crawler (v2.5.12)
   Loading from cache

Class TYPO3\Flow\Composer\InstallerScripts is not autoloadable, can not call post-package-install script
 - Installing symfony/yaml (v2.5.12)
   Loading from cache

... a few more

Class TYPO3\Flow\Composer\InstallerScripts is not autoloadable, can not call post-package-install script
  - Installing doctrine/orm (v2.4.7)
Loading from cache

Class TYPO3\Flow\Composer\InstallerScripts is not autoloadable, can not call post-package-install script
  - Installing typo3/eel (3.0.0-beta3)
    Cloning 108cd4e87cbdfb1d797a513590a3a77466248f8f

[RuntimeException]

  Failed to execute git checkout
 '108cd4e87cbdfb1d797a513590a3a77466248f8f' --   
  && git reset --hard
 '108cd4e87cbdfb1d797a513590a3a77466248f8f'     --              
 fatal: Not a git repository (or any of the parent directories): 
 .git           

在一篇博文中,作者描述了更新机器的 git 版本。我试过了。当前的 git 版本是(gentoo linux - 列出使用的使用标志):

 dev-vcs/git-2.4.1::gentoo  USE="blksha1 cgi curl gpg iconv nls  
 pcre perl python threads webdav -cvs -doc -emacs -gnome-keyring 
 -gtk -highlight -mediawiki (-ppcsha1) -subversion {-test} -tk 
 -xinetd" PYTHON_TARGETS="python2_7" 0 KiB

RuntimeException 的原因可能是什么? composer、neos 内部出错或由于本地配置(php、git、...)?

【问题讨论】:

    标签: git composer-php neoscms


    【解决方案1】:

    https://github.com/composer/composer/issues/996 提到了一种解决方法。

    composer update --prefer-dist
    

    完成任务

    【讨论】:

      【解决方案2】:

      sudo composer update 解决了我的问题,可能是因为在某些时候您在 sudo 模式下运行了作曲家更新

      【讨论】:

      • 这个答案与已经接受的 4 岁答案非常相似。您能否考虑在该评论中添加评论以要求改进?
      • 这可能有很大的不同,因为这意味着在sudo 下调用composer 会产生不同的结果
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-03
      • 2015-09-13
      • 2016-04-09
      • 2018-04-22
      • 2016-04-29
      • 1970-01-01
      • 2017-01-20
      相关资源
      最近更新 更多