【问题标题】:Install or use php composer in windows (fails)在 windows 中安装或使用 php composer (失败)
【发布时间】:2013-02-02 05:51:24
【问题描述】:

所以基本上我在我的 Windows 安装中使用 composer 没有任何问题。突然我在每个项目上都遇到了这个错误(手动安装 composer.phar):

  [RuntimeException]                                                           
  Could not rename "Xampp\htdocs\symfony.dev\vendor/twig/twig/fabpot-Twig-  
  70fff8b" to "Users\xxx\AppData\Local\Temp/23cd0cd163431d8305983511f9  
  b1c2af".

我尝试在不同的 php 应用程序上安装或更新。总是一样的结果。

我还尝试通过 Windows 安装程序安装 composer,这导致我收到此错误消息:

Internal Error [ERR_LOGIC]: An internal script did not run correctly (exit code 1)

到目前为止,我无法获得任何官方帮助。还有其他人遇到过这个错误吗?感谢您的帮助...提前非常感谢!

【问题讨论】:

  • 我建议您检查错误中显示的源目录和输出目录的权限。重命名失败通常是由于(写入)权限不足造成的。也许尝试以管理员身份运行?
  • 另外请记住,windows 的最大路径长度仍为 255 个字符
  • 也尝试清除您的临时文件夹。也许某些文件已损坏。我记得我前段时间遇到过类似的问题。

标签: php installation composer-php packagist


【解决方案1】:

当你运行任何命令或启动 cmd.您已收到:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved. 
The system cannot find the path specified.

如果有,请尝试以下操作。

Open the Registry Editor, type regedit and hit Enter
Navigate to HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun 
and clear the values.

【讨论】:

    猜你喜欢
    • 2019-08-11
    • 2023-02-26
    • 2017-08-25
    • 2017-11-03
    • 2021-05-25
    • 2021-08-10
    • 2019-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多