Composer & Cygwin

后端 未结 13 2416
醉酒成梦
醉酒成梦 2021-01-30 04:22

Composer doesn\'t run correctly in Cygwin if you try to install it \"globally\".

Putting composer.phar into /usr/local/bin/composer, then trying to run it will result in

13条回答
  •  梦谈多话
    2021-01-30 04:52

    Getting composer to work globally inside Cygwin is a pain in the butt...

    The solutions I have come up with:

    1. Don't use it globally. If you are using the PHP CLI from a Windows installation, it won't recognize the Linux paths that Cygwin uses.

      What I have done is put it in the base directory of all the projects I use composer with, and do ../composer.phar to run it.

      It works fine this way, and it's almost globally available...

    2. Download, and compile your own PHP binaries within Cygwin... Yea, kind of a overkill.

提交回复
热议问题