Error on "brew uninstall --cask wireshark" / "brew install --cask wireshark": the package path specified was invalid #4190
Replies: 5 comments 3 replies
-
Given it is complaining about missing Maybe see what is inside directory:
The Cask uninstall logic hasn't changed in last few releases. Could be some incomplete uninstall but hard to tell without additional info. Final resort would be manual uninstall and/or I at least tried out installing/uninstalling current 4.0.3 version and didn't see an issue there. |
Beta Was this translation helpful? Give feedback.
-
I'm running into this as well; I wound up installing the wireshark CLI first and unintentionally aborted installation of the cask in the middle of installation. It looks like the "Uninstall ChmodBPF.pkg" postinstall script is brittle: set -e
CHMOD_BPF_PLIST="/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist"
BPF_GROUP="access_bpf"
launchctl unload -F "$CHMOD_BPF_PLIST"
dscl . -read /Groups/"$BPF_GROUP" > /dev/null 2>&1 && \
dseditgroup -q -o delete "$BPF_GROUP"
rm -rf "/Library/Application Support/Wireshark"
rm -f "$CHMOD_BPF_PLIST"
# ChmodBPF hasn't been a startup item since 2018 (ac4f3c0f4d).
rm -rf /Library/StartupItems/ChmodBPF
# https://gitlab.com/wireshark/wireshark/-/issues/18734
pkgutil --forget org.wireshark.ChmodBPF.pkg Since we're running |
Beta Was this translation helpful? Give feedback.
-
I went into the exact same problem recently, brew version is 4.0.7, upcoming update is 4.0.8, and have tried uninstalling with brew, and the same output as you have posted. I found a workaround: I downloaded 4.0.8 ARM from wireshark.org, installed it, and then went back to the terminal to run |
Beta Was this translation helpful? Give feedback.
-
What worked for me was |
Beta Was this translation helpful? Give feedback.
-
#!/usr/bin/env bash
VERSION="$1"
if [ -z "${VERSION}" ]; then
echo "Please set VERSION"
exit 1
fi
# fd pkg /opt/homebrew/Caskroom/wireshark/${VERSION}/Wireshark.app
ln -s /opt/homebrew/Caskroom/wireshark/${VERSION}/Wireshark.app/Contents/Resources/Extras/Remove\ Wireshark\ from\ the\ system\ path.pkg /opt/homebrew/Caskroom/wireshark/${VERSION}/
ln -s /opt/homebrew/Caskroom/wireshark/${VERSION}/Wireshark.app/Contents/Resources/Extras/Uninstall\ ChmodBPF.pkg /opt/homebrew/Caskroom/wireshark/${VERSION}/
brew reinstall --cask wireshark
and run:
|
Beta Was this translation helpful? Give feedback.
-
Output of
brew config
Output of
brew doctor
Description of issue
I cannot uninstall, reinstall, or remove the wireshark cask with homebrew.
Could someone please help? I just want a fully working fully upgradable wireshark cask. I have no idea how to fix this.
Beta Was this translation helpful? Give feedback.
All reactions