@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

MSYSでpacman使うと /path/to/file exists in filesystemがいっぱい出て困った

tl;dr

$ pacman -S package --overwrite=*

で上書きしてくれる。--forceではない。

背景

MSYSでパッケージをインストールしようと pacman -S package-nameとすると以下のようなエラーが流れてインストールできず。 システムの更新もままならず、オフィシャルの古いwikiに従って消したらシステムがぶっ壊れた。 もう一度MSYSを一から入れても再発。

$ pacman -S bash
warning: bash-4.4.023-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) bash-4.4.023-2

Total Installed Size:  9.63 MiB

;; Proceed with installation? [Y/n] y

...

error: failed to commit transaction (conflicting files)
bash: /usr/bin/bash.exe exists in filesystem
bash: /usr/bin/bashbug exists in filesystem
bash: /usr/bin/sh.exe exists in filesystem

...

Error occurred, no packages were upgraded.

最終的にこのSOに助けられました。

stackoverflow.com