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