dockutil
dockutil copied to clipboard
Not working on macOS 12.3 - need to upgrade Homebrew version from 2 to 3
Could you please update the homebrew installation so that it installs version 3 instead of 2?
Version 2 doesn't even work on standard macOS Monterey 12.3 anymore, since python 2 has been removed.
> dockutil
zsh: /opt/homebrew/bin/dockutil: bad interpreter: /usr/bin/python: no such file or directory
Thanks for a great tool!
I get the same error, also use homebrew for installation, and would appreciate a fix (thanks @Mellbourn). Doubling down on the thanks for making a great tool! ❤️

@Mellbourn and @karnaker that's actually the wrong place for this issue I think. As it is a homebrew
issue and not a dockutil
issue. That beeing said, I may bring some light into the darkness:
There was once a pull request on homebrew-core
for this: https://github.com/Homebrew/homebrew-core/pull/96391. But it wouldn't build.
Fast forward, someone else opened a new PR for this: https://github.com/Homebrew/homebrew-core/pull/97394 There's a discussion in this PR about the build issue. As fas as I understood (I'm not a developer) situation is this: To be a formulae, the software must be able to be built from source. Which does not work for this software withe the current tools available in Homebrew. If this can not be fixed, the dockutil
formulae must be removed and replaced by a cask. As casks can be binaries.
There's also already a corresponding issue over here: https://github.com/kcrawford/dockutil/issues/122. Still not being a developer, I understand from there that @sashkab has an idea for a solution for which he is awaiting a basic approval from @kcrawford prior to do all the work needed.
That being said, I see chances that eventually dockutil
version 3.x will be available in Homebrew.
Meanwhile, if you need to have it installed and want to do it in a automated manner, something like this would be possible:
brew install jq
DLURL=$(curl --silent "https://api.github.com/repos/kcrawford/dockutil/releases/latest" | jq -r .assets[].browser_download_url | grep pkg)
curl -sL ${DLURL} -o /tmp/dockutil.pkg
sudo installer -pkg "/tmp/dockutil.pkg" -target /
rm /tmp/dockutil.pkg
Meanwhile, if you need to have it installed and want to do it in a automated manner, something like this would be possible:
brew install jq DLURL=$(curl --silent "https://api.github.com/repos/kcrawford/dockutil/releases/latest" | jq -r .assets[].browser_download_url | grep pkg) curl -sL ${DLURL} -o /tmp/dockutil.pkg sudo installer -pkg "/tmp/dockutil.pkg" -target / rm /tmp/dockutil.pkg
@tuxpeople thanks so much for posting this! Ran into this issue and your snippets worked great (clean install of macOS Monterey 12.3).
I've made temporary solution to get 3.0.2 version with brew:
$ brew tap lotyp/homebrew-formulae
$ brew install lotyp/formulae/dockutil
$ dockutil --version
3.0.2
But as it is *.pkg file with bin inside, probably by now it should be cask, or changes should be made in brew official formluae/cask
https://github.com/lotyp/homebrew-formulae
For zsh, you need quotes here ... jq -r '.assets[].browser_download_url' ...
.
Becomes
brew install jq
DLURL=$(curl --silent "https://api.github.com/repos/kcrawford/dockutil/releases/latest" | jq -r '.assets[].browser_download_url' | grep pkg)
curl -sL ${DLURL} -o /tmp/dockutil.pkg
sudo installer -pkg "/tmp/dockutil.pkg" -target /
rm /tmp/dockutil.pkg
If anyone is willing to use a temporary solution, I've created a cask to use the new version here.
$ brew install --cask hpedrorodrigues/tools/dockutil
However, I'll deprecate it once an official cask is released.
As happy as I am that there are a few community provided temporary solutions, this still needs to be fixed. Anyone actively working on this?
Hello, AFAIK autor does not support Hombrew formula of dockutil. If you want to add support you can do it on your own, please see https://docs.brew.sh/Adding-Software-to-Homebrew
I use a similar method to @tuxpeople 's method, but it doesn't depend on jq
or homebrew at all:
pkg_name=$(curl -s https://api.github.com/repos/kcrawford/dockutil/releases/latest | grep "dockutil-.*\.pkg\"" \
| head -1| cut -d : -f 2,3 | tr -d \" | tr -d ,| xargs )
source="https://github.com/kcrawford/dockutil/releases/latest/download/${pkg_name}"
tempPath=$(mktemp -t "dockutil.XXXXXXXXX")
curl -L --max-redirs 5 -sS "$source" -o "$tempPath"
etc
With the 3.1.0 release, I think homebrew formula maintainers should have what they need now to update the formula.
This is great! Just a piece of advice for others who may also be as confused as I was:
If you have the old dockutil cask installed from hpedrorodrigues/tools/dockutil then:
You should first uninstall the old dockutil cask, explicitly:
brew uninstall --cask dockutil
then you can install the formula
brew install dockutil
If you do not uninstall the cask, the cask may be found instead of the formula when running on the command line.