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

[email protected] fails to install in GitHub runner image #173191

Closed
4 tasks done
bebound opened this issue May 30, 2024 · 9 comments
Closed
4 tasks done

[email protected] fails to install in GitHub runner image #173191

bebound opened this issue May 30, 2024 · 9 comments
Labels
bug Reproducible Homebrew/homebrew-core bug stale No recent activity upstream issue An upstream issue report is needed

Comments

@bebound
Copy link
Contributor

bebound commented May 30, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9fdb0d53990d3e62e25325a6f89dbb769e84a530
Last commit: 3 days ago
Core tap HEAD: d9c1c710da2bc80ab6f41c57af1b6ba622fc7686
Core tap last commit: 4 minutes ago
Core tap JSON: 30 May 03:00 UTC
Core cask tap HEAD: 653ebda172de4be72eba8b018ae5b89fde67aca3
Core cask tap last commit: 2 hours ago
Core cask tap JSON: 30 May 03:00 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: ["--no-quarantine"]
HOMEBREW_COLOR: set
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_AUTO_UPDATE: set
HOMEBREW_NO_INSTALL_CLEANUP: set
Homebrew Ruby: 3.3.1 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.1/bin/ruby
CPU: quad-core 64-bit ivybridge
Clang: 14.0.0 build 1400
Git: 2.45.1 => /usr/local/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 12.7.4-x86_64
CLT: 14.2.0.0.1.1668646533
Xcode: 14.2 => /Applications/Xcode_14.2.app/Contents/Developer


Please note that these warnings are just used to help the Homebrew maintainers
Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  [email protected]
  packer
  [email protected]

with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  [email protected]
  packer
  [email protected]

Warning: You have an unnecessary local Cask tap.
This can cause problems installing up-to-date casks.
Please remove it by running:
  brew untap homebrew/cask

Warning: You have an unnecessary local Cask tap.
This can cause problems installing up-to-date casks.
Please remove it by running:
  brew untap homebrew/cask

Warning: You have an unnecessary local Core tap!
This can cause problems installing up-to-date formulae.
Please remove it by running:
 brew untap homebrew/core

Warning: You have an unnecessary local Core tap!
This can cause problems installing up-to-date formulae.
Please remove it by running:
 brew untap homebrew/core

Warning: Broken symlinks were found. Remove them with `brew cleanup`:
  /usr/local/etc/bash_completion.d/prlctl
  /usr/local/etc/bash_completion.d/prlsrvctl
  /usr/local/share/man/man8/prl_convert.8
  /usr/local/share/man/man8/prl_disk_tool.8
  /usr/local/share/man/man8/prlctl.8
  /usr/local/share/man/man8/prlexec.8
  /usr/local/share/man/man8/prlsrvctl.8

Warning: Broken symlinks were found. Remove them with `brew cleanup`:
  /usr/local/etc/bash_completion.d/prlctl
  /usr/local/etc/bash_completion.d/prlsrvctl
  /usr/local/share/man/man8/prl_convert.8
  /usr/local/share/man/man8/prl_disk_tool.8
  /usr/local/share/man/man8/prlctl.8
  /usr/local/share/man/man8/prlexec.8
  /usr/local/share/man/man8/prlsrvctl.8

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Install [email protected] package

Related issue: Azure/azure-cli#29054

What happened (include all command output)?

The exit code is 1

Run brew install [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/manifests/3.11.9
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/434092e38cddf8d8908f3dad7a233fe43e47dc9fdf39bac5845e656f0bc1110f--python@3.11-3.11.9.bottle_manifest.json
==> Fetching [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/blobs/sha256:35a3fa7bc0dd78055d3ff8ca238366d7c78bb322cd5c09d8a2f3b4e7d07baf82
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/a0eeb298568552038d4e047fd56d4c8be093bb55336e93047b56e783268a5d86--python@3.11--3.11.9.monterey.bottle.tar.gz
==> Pouring [email protected]
Error: The `brew link` step did not complete successfully
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-3.11
Target /usr/local/bin/2to3-3.11
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3-3.11'

To force the link and overwrite all conflicting files:
  brew link --overwrite [email protected]

To list all files that would be deleted:
  brew link --overwrite [email protected] --dry-run

Possible conflicting files are:
/usr/local/bin/2to3-3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/2to3-3.11
/usr/local/bin/idle3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/idle3.11
/usr/local/bin/pydoc3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/pydoc3.11
/usr/local/bin/python3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
/usr/local/bin/python3.11-config -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11-config
==> /usr/local/Cellar/[email protected]/3.11.9/bin/python3.11 -Im ensurepip
==> /usr/local/Cellar/[email protected]/3.11.9/bin/python3.11 -Im pip install -v --no-
==> Caveats
Python has been installed as
  /usr/local/bin/python3.11

Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to
`python3.11`, `python3.11-config`, `pip3.11` etc., respectively, have been installed into
  /usr/local/opt/[email protected]/libexec/bin

You can install Python packages with
  pip3.11 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.11/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install [email protected]

gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately:
  brew install [email protected]
`dbm.ndbm` changed database backends in Homebrew Python 3.11.
If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`,
you'll need to read your database using the older version of Homebrew Python and convert to another format.
`dbm` still defaults to `dbm.gnu` when it is installed.

If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH:
  brew install python3

For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/[email protected]/3.11.9: 3,327 files, 62.3MB
Error: Process completed with exit code 1.

What did you expect to happen?

The exit code should be 0

Step-by-step reproduction instructions (by running brew commands)

Here is the command:

brew update
brew uninstall azure-cli
brew install [email protected]

Here is the GitHub workflow log:
https://github.com/bebound/starter-workflows/actions/runs/9296281295/job/25584574480

@bebound bebound added the bug Reproducible Homebrew/homebrew-core bug label May 30, 2024
@bebound
Copy link
Contributor Author

bebound commented May 30, 2024

This could be fixed by running brew unlink [email protected] && brew link --overwrite [email protected] at the beginning.

This is treated as a runner image bug in #165793 (comment) when installing [email protected]
However, it's also treated it as a Homebrew bug in actions/runner-images#9471 (comment)

I wonder what's the real cause of this issue.

@carlocab
Copy link
Member

carlocab commented May 30, 2024

Could you check what the output of

file /usr/local/bin/2to3-3.11
ls -la /usr/local/bin/2to3-3.11
readlink /usr/local/bin/2to3-3.11 

is before doing brew install [email protected]?

@Bo98
Copy link
Member

Bo98 commented May 30, 2024

I wonder what's the real cause of this issue.

The real cause is GitHub Actions installs non-Homebrew Python into the Homebrew prefix so it's a GitHub bug due to that since you can't install two things into the same place.

The issue is fixed on their macos-14 image. It will likely never be fixed on their older images at this point.

@carlocab
Copy link
Member

The real cause is GitHub Actions installs non-Homebrew Python into the Homebrew prefix so it's a GitHub bug due to that since you can't install two things into the same place.

This was my suspicion too, but wanted to be sure. No idea why actions/runner-images#9471 (comment) suggests otherwise.

@bebound
Copy link
Contributor Author

bebound commented May 30, 2024

Could you check what the output of

file /usr/local/bin/2to3-3.11
ls -la /usr/local/bin/2to3-3.11
readlink /usr/local/bin/2to3-3.11 

is before doing brew install [email protected]?

Run file /usr/local/bin/2to3-3.11
/usr/local/bin/2to3-3.11: a /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 script text executable, ASCII text

Run ls -la /usr/local/bin/2to3-3.11
lrwxr-xr-x  1 root  wheel  72 May 15 02:33 /usr/local/bin/2to3-3.11 -> ../../../Library/Frameworks/Python.framework/Versions/3.11/bin/2to3-3.11

Run readlink /usr/local/bin/2to3-3.11
../../../Library/Frameworks/Python.framework/Versions/3.11/bin/2to3-3.11

@bebound bebound changed the title [email protected] fails to install on GitHub runner image [email protected] fails to install in GitHub runner image May 30, 2024
@carlocab
Copy link
Member

Yep, seems like a GitHub Actions issue to me.

Try doing

brew install --overwrite [email protected]

@bebound
Copy link
Contributor Author

bebound commented May 30, 2024

brew install --overwrite [email protected] also works.

It appears that the link file generated by /Library/Frameworks/Python.framework/Versions/3.11/ conflict with [email protected].

I believe this is a runner image bug, I'll create a bug report later.

Ref:
actions/setup-python#577
actions/runner-images#7710

@fxcoudert fxcoudert added the upstream issue An upstream issue report is needed label May 31, 2024
jschwartzentruber added a commit to MozillaSecurity/orion that referenced this issue Jun 5, 2024
jschwartzentruber added a commit to MozillaSecurity/orion that referenced this issue Jun 6, 2024
jschwartzentruber added a commit to MozillaSecurity/orion that referenced this issue Jun 6, 2024
joto added a commit to joto/osm2pgsql that referenced this issue Jun 15, 2024
Workaround for github/brew problem. Python is already install
on the Github action runner and then homebrew comes along...
See also: Homebrew/homebrew-core#173191
joto added a commit to joto/osm2pgsql that referenced this issue Jun 15, 2024
Workaround for github/brew problem. Python is already install
on the Github action runner and then homebrew comes along...
See also: Homebrew/homebrew-core#173191
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Jun 22, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug stale No recent activity upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

4 participants