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

portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz "The use of 'ruby' has been blocked because it comes from an unidentified developer." #17422

Closed
alpha-baby opened this issue Jun 4, 2024 · 6 comments
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@alpha-baby
Copy link

brew doctor output

in my macbook pro 
Apple M1 Pro 13.2.1 (22D68)

"The use of 'ruby' has been blocked because it comes from an unidentified developer."


$ brew doctor
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:bbb73a9d86fa37128c54c74b020096a646c46c525fd5eb0c4a2467551fb2d377
Already downloaded: /Users/fujianhao/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
==> Pouring portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Library/Homebrew/cmd/vendor-install.sh: line 218: 87372 Killed: 9               "./${VENDOR_VERSION}/bin/${VENDOR_NAME}" --version > /dev/null
Error: Failed to install ruby 3.3.2!
Error: Failed to upgrade Homebrew Portable Ruby!


### Verification

- [X] My "`brew doctor` output" above says `Your system is ready to brew.` and am still able to reproduce my issue.
- [X] I ran `brew update` twice and am still able to reproduce my issue.
- [X] This issue's title and/or description do not reference a single formula e.g. `brew install wget`. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

### `brew config` output

```shell
HOMEBREW_VERSION: 4.3.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: e130e47f23b8b806096f9ec4f2c193213b8ec908
Last commit: 30 hours ago
Core tap JSON: 04 Jun 03:23 UTC
Core cask tap JSON: 04 Jun 03:23 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.2 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.2/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.3 build 1403
Git: 2.43.0 => /opt/homebrew/bin/git
Curl: 7.86.0 => /usr/bin/curl
macOS: 13.2.1-arm64
CLT: 14.3.1.0.1.1683849156
Xcode: N/A
Rosetta 2: false

What were you trying to do (and why)?

upgrade brew to latest version

What happened (include all command output)?

$ brew upgrade kubecm
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:bbb73a9d86fa37128c54c74b020096a646c46c525fd5eb0c4a2467551fb2d377
Already downloaded: /Users/fujianhao/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
==> Pouring portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
/opt/homebrew/Library/Homebrew/cmd/vendor-install.sh: line 218: 86692 Killed: 9               "./${VENDOR_VERSION}/bin/${VENDOR_NAME}" --version > /dev/null
Error: Failed to install ruby 3.3.2!
Error: Failed to upgrade Homebrew Portable Ruby!

What did you expect to happen?

macOS will no warnning "The use of 'ruby' has been blocked because it comes from an unidentified developer."

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

download https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:bbb73a9d86fa37128c54c74b020096a646c46c525fd5eb0c4a2467551fb2d377

tar  -zxf ./portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz

./portable-ruby/3.3.2/bin/ruby --version

macOS will warnning "The use of 'ruby' has been blocked because it comes from an unidentified developer."
@alpha-baby alpha-baby added the bug Reproducible Homebrew/brew bug label Jun 4, 2024
@alpha-baby
Copy link
Author

cc #17399 @MikeMcQuaid

@Bo98
Copy link
Member

Bo98 commented Jun 4, 2024

This isn't a default macOS error so you likely have some security software that's blocking this. macOS itself doesn't enforce Developer ID codesigning on CLI executables - only bundles like apps, pkgs, extensions etc.

If you're facing this issue with Ruby you'll likely face this problem with most homebrew-core formulae.

@alpha-baby
Copy link
Author

This isn't a default macOS error so you likely have some security software that's blocking this. macOS itself doesn't enforce Developer ID codesigning on CLI tools.这不是默认的macOS错误,所以你可能有一些安全软件阻止了它。macOS本身并不在CLI工具上强制执行开发者ID代码签名。

If you're facing this issue with Ruby you'll likely face this problem with most homebrew-core formulae.如果你在Ruby中遇到这个问题,你很可能会在大多数自制的核心公式中面临这个问题。

image

Thank you for your explanation.
Indeed, there are some security control softwares installed on my computer by the company, but the issue with ruby being blocked occurred with an error message that was in Chinese. It roughly translates to: 'The use of 'ruby' has been blocked because it comes from an unidentified developer.'
Is it possible that this error in macOS is caused by the interception of a third-party security software?

@Bo98
Copy link
Member

Bo98 commented Jun 4, 2024

Thanks for the screenshot.

Is it possible that this error in macOS is caused by the interception of a third-party security software?

Yes, this seems likely.

Try check:

$ xattr ~/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz

It should print nothing, but maybe your security software is adding com.apple.quarantine. If I manually add com.apple.quarantine myself then I get the same error as you.

If you do see com.apple.quarantine, you may be able to clear it with xattr -c ~/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz

You should also try xattr on portable-ruby/3.3.2/bin/ruby too as it might not always appear on the tar.gz

@alpha-baby
Copy link
Author

╰─ xattr -l ~/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
com.apple.quarantine: 0000;00000000;Aspect;
╭─░▒▓    ~ ·············································································································································································································· ✔  13:51:30  ▓▒░
╰─ tar -zxf !$
╭─░▒▓    ~ ·············································································································································································································· ✔  13:51:46  ▓▒░
╰─ tar -zxf ~/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
╭─░▒▓    ~ ·············································································································································································································· ✔  13:51:48  ▓▒░
╰─ ./portable-ruby/3.3.2/bin/ruby --version
[1]    70389 killed     ./portable-ruby/3.3.2/bin/ruby --version
╭─░▒▓    ~ ·································································································································································································· KILL ✘  7s   13:52:11  ▓▒░
╰─ xattr -l ./portable-ruby/3.3.2/bin/ruby
com.apple.quarantine: 0081;00000000;Aspect;
╭─░▒▓    ~ ·············································································································································································································· ✔  13:52:24  ▓▒░
╰─ xattr ~/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
com.apple.quarantine
╭─░▒▓    ~ ·············································································································································································································· ✔  13:53:04  ▓▒░
╰─ xattr ./portable-ruby/3.3.2/bin/ruby
com.apple.quarantine
╭─░▒▓    ~ ·············································································································································································································· ✔  13:53:15  ▓▒░
╰─ xattr -c ~/Library/Caches/Homebrew/portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz
╭─░▒▓    ~ ·············································································································································································································· ✔  13:54:09  ▓▒░
╰─ xattr -c ./portable-ruby/3.3.2/bin/ruby
xattr: [Errno 13] Permission denied: './portable-ruby/3.3.2/bin/ruby'
╭─░▒▓    ~ ············································································································································································································ 1 ✘  13:54:17  ▓▒░
╰─ sudo xattr -c ./portable-ruby/3.3.2/bin/ruby
Password:
╭─░▒▓    ~ ······································································································································································································· ✔  5s   13:54:28  ▓▒░
╰─ xattr ./portable-ruby/3.3.2/bin/ruby
╭─░▒▓    ~ ·············································································································································································································· ✔  13:54:37  ▓▒░
╰─ ./portable-ruby/3.3.2/bin/ruby --version
ruby 3.3.2 (2024-05-30 revision e5a195edf6) [arm64-darwin20]

@alpha-baby
Copy link
Author

@Bo98 Indeed, it is consistent with your description. Thank you very much for your explanation and for helping me solve this problem. I wish you a pleasant life.

@github-actions github-actions bot added the outdated PR was locked due to age label Jul 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

2 participants