Composer & Cygwin

后端 未结 13 2176
醉酒成梦
醉酒成梦 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 05:07

    I was having trouble getting Composer to work in Cygwin and none of the solutions above were resolving my problem. Eventually I stumbled across this comment in the Composer github bugs discussion:

    Yeah TBH using php from cygwin isn't a great idea, cygwin is just too different an environment. Too many hacks that create failures.. In any case closing here as there isn't much we can do I'm afraid :)

    I don't know precisely where composer/Cygwin/php was tripping up, but, broadly, my problem was that I had two conflicting installations of PHP in environmental variables, one from an installation of WAMP, and another installed with Cygwin. The Cygwin PHP installation seemed to be struggling with some sort of path issue. I removed it, using only the WAMP PHP, and composer ran in Cygwin just fine.

提交回复
热议问题