Composer & Cygwin

后端 未结 13 2320
醉酒成梦
醉酒成梦 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条回答
  •  萌比男神i
    2021-01-30 05:10

    The easiest way is to install composer using the Windows installer from their website and then copy the two files 'composer' and 'composer.phar' from "C:\ProgramData\Composer" into a directory which is in the PATH variable. E.g. you could copy the files into the /bin/ directory of cygwin. Afterwards you can again uninstall the "Windows version" of composer.

    Update! This is what I did:

    1. Install PHP and needed modules from the Cygwin Ports project
    2. Download the latest composer snapshot
    3. Rename 'composer.phar' to 'composer' and save it to /usr/local/bin
    4. Open /bin/dash.exe and run '/usr/bin/rebaseall'
    5. Also if 4. gives you an error, composer should run now

提交回复
热议问题