wkhtmltopdf-windows icon indicating copy to clipboard operation
wkhtmltopdf-windows copied to clipboard

Unable to install - name conflicts with an existing file

Open krtorio opened this issue 7 years ago • 3 comments

I am unable to install the package

Command used: composer require wemersonjanuario/wkhtmltopdf-windows "0.12.2.3" -vvv

Output: Package operations: 1 install, 0 updates, 0 removals Installs: wemersonjanuario/wkhtmltopdf-windows:0.12.2.3

  • Installing wemersonjanuario/wkhtmltopdf-windows (0.12.2.3): Reading C:/Users/Win8/AppData/Local/Composer/files/wemersonjanuario/wkhtmltopdf-windows/57c4fd5596d6849f3e145153272eef5179ba54d7.zip from cache Loading from cache Extracting archive Skipped installation of bin bin/64bit/wkhtmltopdf.exe for package wemersonjanuario/wkhtmltopdf-windows: name conflicts with an existing file Skipped installation of bin bin/64bit/wkhtmltoimage.exe for package wemersonjanuario/wkhtmltopdf-windows: name conflicts with an existing file REASON: Required by the root package: Install command rule (install wemersonjanuario/wkhtmltopdf-windows 0.12.2.3)

krtorio avatar Oct 05 '17 09:10 krtorio

You likely have a custom bin-dir defined in your composer.json. You either need to remove that or manually delete the files that conflict on composer install.

See https://getcomposer.org/doc/articles/vendor-binaries.md#can-vendor-binaries-be-installed-somewhere-other-than-vendor-bin-.

You can potentially have the same logic without this error on composer install by adding a symlink:

ln -s vendor/bin bin

Note: You might have to rm -rf bin first or else it will make a symlink bin/bin to vendor/bin.

kirkmadera avatar Oct 26 '19 18:10 kirkmadera

I am experiencing the same issue.

Any solution?

nwaweru avatar Aug 05 '22 15:08 nwaweru

This occurs because in version 0.12.2.3 the owner of the lib placed two .bin files with the same name. I suggest using this link and downloading it: https://wkhtmltopdf.org/downloads.html

lucasferro0 avatar Aug 25 '24 03:08 lucasferro0