Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on macOS 12.3 - need to upgrade Homebrew version from 2 to 3 #127

Closed
Mellbourn opened this issue Mar 15, 2022 · 11 comments
Closed

Comments

@Mellbourn
Copy link

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!

@Mellbourn Mellbourn changed the title Homebrew version is 2 not 3 Upgrade Homebrew version from 2 to 3 Mar 15, 2022
@Mellbourn Mellbourn changed the title Upgrade Homebrew version from 2 to 3 Not working on macOS 12.3 - need to upgrade Homebrew version from 2 to 3 Mar 15, 2022
@karnaker
Copy link

karnaker commented Mar 23, 2022

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! ❤️

Screen Shot 2022-03-23 at 4 09 03 PM

@tuxpeople
Copy link

tuxpeople commented Apr 1, 2022

@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: Homebrew/homebrew-core#96391. But it wouldn't build.

Fast forward, someone else opened a new PR for this: Homebrew/homebrew-core#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: #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

@shawndwells
Copy link

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).

@lotyp
Copy link

lotyp commented Apr 12, 2022

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

@brianephraim
Copy link

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

@hpedrorodrigues
Copy link

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.

@boldandbrad
Copy link

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?

@ferben
Copy link
Contributor

ferben commented Jul 20, 2022

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

@nighthawk663
Copy link

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

clhynfield added a commit to clhynfield/mac-dev-playbook that referenced this issue Jul 22, 2022
…at least until [dockutil updates to Swift package management][2] and
[Homebrew updates to dockutil v3][3].

[1]: kcrawford/dockutil#127 (comment)
[2]: kcrawford/dockutil#131
[3]: Homebrew/homebrew-core#97394
drew1kun pushed a commit to drew1kun/ansible-role-macdock that referenced this issue Aug 1, 2022
drew1kun pushed a commit to drew1kun/ansible-role-macdock that referenced this issue Aug 1, 2022
knightofiam added a commit to knightofiam/dotfiles that referenced this issue Aug 2, 2022
apoxa added a commit to apoxa/ansible-workstation that referenced this issue Aug 10, 2022
…at least until [dockutil updates to Swift package management][2] and
[Homebrew updates to dockutil v3][3].

[1]: kcrawford/dockutil#127 (comment)
[2]: kcrawford/dockutil#131
[3]: Homebrew/homebrew-core#97394
@kcrawford
Copy link
Owner

With the 3.1.0 release, I think homebrew formula maintainers should have what they need now to update the formula.

@Mellbourn
Copy link
Author

Mellbourn commented Dec 30, 2023

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.

dennisse added a commit to dennisse/ansible-collection-mac that referenced this issue Jan 24, 2024
[This issue](kcrawford/dockutil#127) has been
updated, and dockutil can now be installed without the extra cask-step.
ccpost added a commit to ccpost/dotfiles that referenced this issue Feb 25, 2024
The upstream repository merged the changes necessary to update the
Homebrew formula:
kcrawford/dockutil#127 (comment)

So, remove the cask and tap and switch to the mainstream formula.

```sh
brew uninstall --cask dockutil
brew untap hpedrorodrigues/tools
brew install dockutil
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests