Reputation: 13665
There are the following two packages in conflict. What is the correct way to resolve this conflict?
$ brew cask install rar
==> Downloading https://www.rarlab.com/rar/rarosx-5.9.1.tar.gz
Already downloaded: /Users/pengy/Library/Caches/Homebrew/downloads/fdb2cc1e1fa3b659b0fc92139bc9645b2ec844b68df1b1d25c5f956332af6cd1--rarosx-5.9.1.tar.gz
==> Installing Cask rar
==> Moving Generic Artifact 'default.sfx' to '/usr/local/lib/default.sfx'.
==> Moving Generic Artifact 'rarfiles.lst' to '/usr/local/etc/rarfiles.lst'.
==> Linking Binary 'rar' to '/usr/local/bin/rar'.
==> Unlinking Binary '/usr/local/bin/rar'.
==> Backing Generic Artifact 'rarfiles.lst' up to '/usr/local/Caskroom/rar/5.9.1/rar/rarfiles.lst'.
==> Removing Generic Artifact '/usr/local/etc/rarfiles.lst'.
==> Backing Generic Artifact 'default.sfx' up to '/usr/local/Caskroom/rar/5.9.1/rar/default.sfx'.
==> Removing Generic Artifact '/usr/local/lib/default.sfx'.
==> Purging files for version 5.9.1 of Cask rar
Error: It seems there is already a Binary at '/usr/local/bin/unrar'.
$ brew info unrar
unrar: stable 6.0.2 (bottled)
Extract, view, and test RAR archives
https://www.rarlab.com/
/usr/local/Cellar/unrar/5.9.4 (6 files, 503.5KB) *
Poured from bottle on 2020-09-04 at 23:47:13
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/unrar.rb
==> Analytics
install: 36,700 (30 days), 60,145 (90 days), 286,295 (365 days)
install-on-request: 28,778 (30 days), 48,112 (90 days), 221,675 (365 days)
build-error: 0 (30 days)
Upvotes: 4
Views: 3856
Reputation: 5728
I just had this same problem pop up and a Google search led me here, but there was no answer :(
So I just took a leap of faith and uninstalled unrar
:
$ brew uninstall unrar
Uninstalling ... (5 files, 505.8KB)
And then tried the installation of rar
again:
$ brew install rar
...
==> Linking Binary 'rar' to '/usr/local/bin/rar'
==> Linking Binary 'unrar' to '/usr/local/bin/unrar'
🍺 rar was successfully installed!
And sure enough, without unrar
installed the rar
installation succeeded. I was able to verify this by running:
$ which rar
/usr/local/bin/rar
$ which unrar
/usr/local/bin/unrar
Upvotes: 1