Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

466
Vistas
Composer error Could not open input file: composer

I'm having a problem with Composer. I have Composer installed globally on my machine. I am trying to install intercom using composer. I tried the command:

php composer.phar require intercom/intercom-php

but that returned "Could not open input file: composer.phar"

After investigating and reading the issues others have had I then tried

php composer require intercom/intercom-php

but that returned "Could not open input file: composer"

As I stated, I have Composer installed globally on my machine. I can type in the command "composer update" and it works from any directory.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

If you got composer installed globally and composer update just works then get rid of php and instead of

php composer require intercom/intercom-php

just do

composer require intercom/intercom-php

The reason why former form does not work while the latter does is that you are invoking php executable and pass composer as its argument. It is then treated by php binary as script file path and as there's neither relative nor absolute path segments used, just file name, then file composer is expected to exist in current working directory which is no the case. In second invocation, your shell will look for composer binary in all known paths defined in $PATH env variable.

If you wonder where composer executable realy lives, you can use

which composer

Or on Windows

where composer 
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda