简体   繁体   中英

Composer fails to install Piwik on Windows

Tools:

  • Windows 8.1 Pro
  • Composer
  • piwik
  • xampp v3.2.1

I've installed piwik and composer and I'm testing them out in xampp. I'm going through this guide found at: http://developer.piwik.org/guides/getting-started-part-1

However, I've come across an issue. When I'm trying to run the command to install the 3rd party libraries, I'm getting this error:

c:\\xampp\\htdocs\\Projects\\piwik>php C:\\ProgramData\\ComposerSetup\\bin\\composer.phar install

'misc' is not recognized as an internal or external command, operable program or batch file. Script misc/composer/clean-xhprof.sh handling the pre-install-cmd event returned with an error

[RuntimeException] Error Output: 'misc' is not recognized as an internal or external command, operable program or batch file.

Does anyone know why this is happening?

Piwik's composer configuration will run shell scripts to install xhprof if possible. But it seems it is incompatible with Windows.

I had created a new issue on the tracker: https://github.com/piwik/piwik/issues/6493

Edit : I have reproduced it. In the meantime you can use:

php C:\ProgramData\ComposerSetup\bin\composer.phar install --no-scripts

I have tried it and it works on Windows. Remember you also need to have git installed, else some dependencies cannot be fetched.

Edit 2: I have fixed the bug in master, it will be included in the next release, probably 2.9.0.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM