brew 安装 java11 错误:目录不为空

问题描述 投票:0回答:2

尝试使用自制软件在 Mac 上安装 java11。我收到以下错误:

版本:

  • MacOS 12.5.1
  • HomeBrew 3.6.15
$ brew install java11
Running `brew update --auto-update`...
==> Fetching openjdk@11
==> Downloading https://ghcr.io/v2/homebrew/core/openjdk/11/manifests/11.0.17
Already downloaded: /Users/nhegde/Library/Caches/Homebrew/downloads/dbe2b576c95bab6391300376bf2b11c3cd7cba975a7008a831e6c8b68b1ee70e--openjdk@11-11.0.17.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:a7dd4515b5a6c3215390a6fcf07a8809b88cca277ab1c3db190bf644eebce6fe
Already downloaded: /Users/nhegde/Library/Caches/Homebrew/downloads/a4080d6b30cfa6067ff421dfb06d476977e3f7e65ee73c7daf0f9ba03f0d2381--openjdk@11--11.0.17.monterey.bottle.tar.gz
==> Pouring [email protected]
Error: Directory not empty @ dir_s_rmdir - /private/tmp/d20221212-9750-tiwlq

我检查了目录,它确实存在。

$ ls -l /private/tmp/d20221212-9750-tiwlq/
total 0
drwxrwxrwx  3 myuser  wheel  96 Dec 12 13:39 openjdk@11/

非常感谢任何帮助!

homebrew java-11
2个回答
0
投票

您可以尝试使用以下命令手动删除有问题的目录:

sudo rm -rf /private/tmp/d20221212-9750-tiwlq/

另一种选择是从 Eclipse Temurin 安装 JDK 11:

brew tap homebrew/cask-versions
brew install --cask temurin11

0
投票

就我而言(macos Ventura 13.5,Homebrew 4.1.5-55-g3cd7290),我只是重新启动系统,问题就自行解决了(source)。任何其他尝试(

brew doctor
brew cleanup
、卸载并再次安装木桶等)均不成功。

© www.soinside.com 2019 - 2024. All rights reserved.