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

awscli is not working, most probably due to changes in this PR https://github.com/Homebrew/homebrew-core/commit/4c84c85c68748d64b11cc34ac7e1435bf37b7f00 #191091

Closed
4 tasks done
parabolic opened this issue Sep 18, 2024 · 4 comments · Fixed by #191093
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@parabolic
Copy link

parabolic commented Sep 18, 2024

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

Note

I am running this on a ubuntu:20.04 container as the default user root

brew config

root@5e6ec5d9e1cd:/# brew config
HOMEBREW_VERSION: 4.3.23
ORIGIN: https://github.com/Homebrew/brew
HEAD: 42c11a4dedf352229271593de831161071603c66
Last commit: 34 hours ago
Core tap JSON: 18 Sep 12:57 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.4 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/bin/ruby
CPU: 10-core 64-bit unknown_0x0_0x0
Clang: N/A
Git: 2.25.1 => /bin/git
Curl: 7.68.0 => /bin/curl
Kernel: Linux 6.10.4-linuxkit x86_64 GNU/Linux
OS: Ubuntu 20.04.6 LTS
Host glibc: 2.31
/usr/bin/gcc: 9.4.0
/usr/bin/ruby: N/A
glibc: 2.35_1
gcc@11: N/A
gcc: 14.2.0
xorg: N/A

Brew doctor

root@5e6ec5d9e1cd:/# brew doctor
Your system is ready to brew.

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 awscli
brew install awscli

What happened (include all command output)?

It installed just fine, but when I run it gives out a python related error.

root@5e6ec5d9e1cd:/# aws
bash: /home/linuxbrew/.linuxbrew/bin/aws: /home/linuxbrew/.linuxbrew/Cellar/awscli/2.17.53/libexec/bin/python: bad interpreter: No such file or directory

What did you expect to happen?

aws cli command to run

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

$ docker run -it ubuntu:20.04 bash
$ apt update && apt upgrade -y && apt install -y     git     curl     build-essential     jq     apt-transport-https     ca-certificates     gnupg
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
$ brew install awscli
$ aws
bash: /home/linuxbrew/.linuxbrew/bin/aws: /home/linuxbrew/.linuxbrew/Cellar/awscli/2.17.53/libexec/bin/python: bad interpreter: No such file or directory
@parabolic parabolic added the bug Reproducible Homebrew/homebrew-core bug label Sep 18, 2024
@guikcd
Copy link

guikcd commented Sep 18, 2024

My temporary workaround to rebuild previous version locally:

brew tap-new $USER/local-awscli
brew tap homebrew/core --force
brew extract --version=2.17.52 awscli $USER/local-awscli
brew install awscli@2.17.52

@ZhongRuoyu
Copy link
Member

ZhongRuoyu commented Sep 18, 2024

linuxbrew@29f891cdc531:~/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/awscli/2.17.53/libexec/bin$ ls -ahl
total 92K
drwxr-xr-x 2 linuxbrew linuxbrew 4.0K Sep 17 18:07 .
drwxr-xr-x 5 linuxbrew linuxbrew 4.0K Sep 17 18:07 ..
-rwxr-xr-x 1 linuxbrew linuxbrew  852 Sep 17 18:07 aws
-rw-r--r-- 1 linuxbrew linuxbrew  898 Sep 17 18:07 aws.cmd
-rw-r--r-- 1 linuxbrew linuxbrew  204 Sep 17 18:07 aws_bash_completer
-rwxr-xr-x 1 linuxbrew linuxbrew 1.3K Sep 17 18:07 aws_completer
-rw-r--r-- 1 linuxbrew linuxbrew 1.8K Sep 17 18:07 aws_zsh_completer.sh
-rwxr-xr-x 1 linuxbrew linuxbrew  249 Sep 17 18:07 distro
-rwxr-xr-x 1 linuxbrew linuxbrew  253 Sep 17 18:07 docutils
-rwxr-xr-x 1 linuxbrew linuxbrew 1.7K Sep 17 18:07 jp.py
lrwxrwxrwx 1 linuxbrew linuxbrew   10 Sep 17 18:07 python -> python3.11
lrwxrwxrwx 1 linuxbrew linuxbrew   10 Sep 17 18:07 python3 -> python3.11
lrwxrwxrwx 1 linuxbrew linuxbrew   45 Sep 17 18:07 python3.11 -> ../../../../../opt/python@3.11/bin/python3.11
-rwxr-xr-x 1 linuxbrew linuxbrew  629 Sep 17 18:07 rst2html.py
-rwxr-xr-x 1 linuxbrew linuxbrew  751 Sep 17 18:07 rst2html4.py
-rwxr-xr-x 1 linuxbrew linuxbrew 1.1K Sep 17 18:07 rst2html5.py
-rwxr-xr-x 1 linuxbrew linuxbrew  828 Sep 17 18:07 rst2latex.py
-rwxr-xr-x 1 linuxbrew linuxbrew  651 Sep 17 18:07 rst2man.py
-rwxr-xr-x 1 linuxbrew linuxbrew  817 Sep 17 18:07 rst2odt.py
-rwxr-xr-x 1 linuxbrew linuxbrew 1.8K Sep 17 18:07 rst2odt_prepstyles.py
-rwxr-xr-x 1 linuxbrew linuxbrew  636 Sep 17 18:07 rst2pseudoxml.py
-rwxr-xr-x 1 linuxbrew linuxbrew  672 Sep 17 18:07 rst2s5.py
-rwxr-xr-x 1 linuxbrew linuxbrew  908 Sep 17 18:07 rst2xetex.py
-rwxr-xr-x 1 linuxbrew linuxbrew  637 Sep 17 18:07 rst2xml.py
-rwxr-xr-x 1 linuxbrew linuxbrew  705 Sep 17 18:07 rstpep2html.py
-rwxr-xr-x 1 linuxbrew linuxbrew  245 Sep 17 18:07 wheel

Strange that the symlink still refers to Python 3.11. The test should've failed in that case. CC @branchvincent.

carlocab added a commit that referenced this issue Sep 18, 2024
This was missed in #191025.

Fixes #191091.
ZhongRuoyu added a commit that referenced this issue Sep 18, 2024
@ZhongRuoyu
Copy link
Member

This should now be fixed. Please run brew update && brew upgrade awscli.

@parabolic
Copy link
Author

parabolic commented Sep 18, 2024

@ZhongRuoyu I can confirm it works for me now, using the same set of commands that I've reported the issue with.
Thank you all for your swift action!
It is much appreciated!
I'll close this issue. It looks like it's already closed.

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
Projects
None yet
3 participants