【发布时间】:2012-11-03 01:54:31
【问题描述】:
Composer install 命令在我的计算机上本地运行良好:
- 使用包信息加载作曲家存储库
- 从锁定文件安装依赖项
- 无需安装或更新
- 生成自动加载文件
当我通过 ssh 连接到 ubuntu 服务器并运行相同的命令时,我得到了这个。
PHP Fatal error: Class 'Composer\Installers\Installer' not found in phar:///usr/local/bin/composer/src/Composer/Installer/InstallerInstaller.php on line 102
Fatal error: Class 'Composer\Installers\Installer' not found in phar:///usr/local/bin/composer/src/Composer/Installer/InstallerInstaller.php on line 102
我对两台机器都按照此处的说明进行操作: https://github.com/composer/composer/blob/master/README.md
我在这里缺少一些依赖项?我不知道为什么会出现这个错误。
编辑:这是.json(项目是symfony 1.4,也添加标签)
{
"minimum-stability": "dev",
"require" : {
"snappy/sfSnappyPlugin": "*"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/FloranBrutel/sfSnappyPlugin.git"
}
]
}
Edit2:AWS服务器上php -v的输出
PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 18:59:41)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
在我的机器上我有:
PHP 5.3.6-13ubuntu3.9 with Suhosin-Patch (cli) (built: Sep 12 2012 19:00:27)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
【问题讨论】:
-
你能把你的 composer.json 放到我可以尝试重现吗?
-
php -v的输出是什么? -
我真的一无所知。它不应该寻找 Composer\Installer\InstallerInstaller 而不是 Composer\Installers\Installer 吗?
标签: symfony-1.4 php composer-php