Composer install command works fine locally on my computer:
- Loading composer repositories with package information
- Installing dependencies from lock file
- Nothing to install or update
- Generating autoload files
When I connect via ssh to the ubuntu server, and run the same command I get this.
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
I followed the instructions here for both machines:
https://github.com/composer/composer/blob/master/README.md
I am missing some dependencies here? I can’t figure out why that error.
Edit: Here is the .json (project is symfony 1.4, adding tags as well)
{
"minimum-stability": "dev",
"require" : {
"snappy/sfSnappyPlugin": "*"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/FloranBrutel/sfSnappyPlugin.git"
}
]
}
Edit2: The output of the php -v on the AWS server
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
On my machine I have:
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
I have managed to replicate your problem. Within the directory you are running composer, you should have a path like so:
and within this directory there should exist an
Installer.phpfile. I managed to get the same error you are getting by deleting that one file.So I believe a solution would be to simply completely remove your
vendorandpluginsdirectories and try runningcomposer installagain, forcing the complete re-download of all the vendors in yourcomposer.json. Hope this helps.