macOS uses brew to install scala to step on the pit to solve

Problems encountered by direct brew install scala:

==> Installing [email protected] dependency: openjdk
==> Pouring openjdk-16.0.1.arm64_big_sur.bottle.tar.gz
tar: Error opening archive: Failed to open '/Users/yeb/Library/Caches/Homebrew/downloads/87046a09089af20fb63e5a541ef67a3f3f74eee0b4da4cfb699340617ca459c1--openjdk-16.0.1.arm64_big_sur.bottle.tar.gz'
Error: Failure while executing; `tar --extract --no-same-owner --file /Users/yeb/Library/Caches/Homebrew/downloads/87046a09089af20fb63e5a541ef67a3f3f74eee0b4da4cfb699340617ca459c1--openjdk-16.0.1.arm64_big_sur.bottle.tar.gz --directory /private/tmp/d20210831-94835-10pepc5` exited with 1. Here's the output:
tar: Error opening archive: Failed to open '/Users/yeb/Library/Caches/Homebrew/downloads/87046a09089af20fb63e5a541ef67a3f3f74eee0b4da4cfb699340617ca459c1--openjdk-16.0.1.arm64_big_sur.bottle.tar.gz'

It was found that the problem was that it could not be decompressed when installing openjdk

brew info openjdk
found missing dependencies

==> Dependencies
Build: autoconf ✘
==> Requirements
Build: Xcode ✘
==> Caveats

After brew info openjdk
is installed successfully
, execute brew info scala

Guess you like

Origin blog.csdn.net/kunAUGUST/article/details/120027295