Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Cannot use Composer\Installer as Installer because the name is already in use in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 13 #197

Open
magicento opened this issue Feb 27, 2017 · 6 comments

Comments

@magicento
Copy link

` - Installing composer/semver (1.4.2) Loading from cache

  • Installing composer/composer (1.0.0-beta1) Loading from cache
  • Installing magento/composer (1.0.3) Loading from cache
  • Installing tedivm/jshrink (v1.0.1) Loading from cache
  • Installing phpseclib/phpseclib (2.0.4) Loading from cache
  • Installing symfony/event-dispatcher (v2.8.17) Loading from cache
  • Installing tubalmartin/cssmin (v2.4.8-p4) Loading from cache
  • Installing pelago/emogrifier (v0.1.1) Loading from cache
  • Installing oyejorge/less.php (v1.7.0.10) Loading from cache
  • Installing monolog/monolog (1.16.0) Loading from cache
  • Installing magento-hackathon/magento-composer-installer (3.0.7) Loading from cache

Fatal error: Cannot use Composer\Installer as Installer because the name is already in use in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 13
`

@Flyingmana
Copy link
Member

how can I reproduce this?

@cyxddgithub
Copy link

hi @Flyingmana i also meet this problem.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition ./e_commerce_magento/
Installing magento/project-community-edition (2.1.5)

  • Installing magento/project-community-edition (2.1.5)
    Loading from cache

Created project in ./e_commerce_magento/
Loading composer repositories with package information
...

PHP Fatal error: Cannot use Composer\Installer as Installer because the name is already in use in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(193) : eval()'d code on line 13

@Flyingmana
Copy link
Member

@cyxddgithub your error occures for Magento2, where the "magento-hackathon/magento-composer-installer" should not be used for (its only for magento1)
seems like this M2 related bug should be reported to magento instead

@davidverholen
Copy link
Contributor

just an idea: do you maybe have the hackathon composer installer installed globally?
you should be able to see that with composer global show -i (the -i param is only needed in older composer versions)

@cyxddgithub
Copy link

@davidverholen here is my composer show result seem lick no global install it:
Changed current directory to /home/vagrant/.composer
doctrine/inflector v1.1.0 Common String Manipulations with regard to casing and singular/plural rules.
guzzlehttp/guzzle 6.2.0 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.2.0 Guzzle promises library
guzzlehttp/psr7 1.3.1 PSR-7 message implementation
illuminate/contracts v5.2.37 The Illuminate Contracts package.
illuminate/support v5.2.37 The Illuminate Support package.
laravel/envoy v1.2.0 Elegant SSH tasks for PHP.
laravel/installer v1.3.3 Laravel application installer.
nategood/httpful 0.2.20 A Readable, Chainable, REST friendly, PHP HTTP Client
paragonie/random_compat v1.4.1 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
psr/http-message 1.0 Common interface for HTTP messages
symfony/console v3.1.1 Symfony Console Component
symfony/polyfill-mbstring v1.2.0 Symfony polyfill for the Mbstring extension
symfony/process v3.1.1 Symfony Process Component

@Flyingmana got it i have try report it in magento2 issue

@davidverholen
Copy link
Contributor

I think it's still another problem, since magento 2 would not require the hackathon composer installer.
Try executing

composer why magento-hackathon/magento-composer-installer

it should show you the module, that requires the hackathon installer. Most likely you have a Magento1 Module in your requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants