[Solved] MAC system brew install error: failure while executing

Error when installing Apache http server on Mac, brew install httpd
The error message is as follows:

==> Installing httpd dependency: nghttp2
==> Pouring nghttp2-1.44.0.big_sur.bottle.tar.gz
tar: Error opening archive: Failed to open ‘/Users/zhaopengkang/Library/Caches/Homebrew/downloads/727a7b871748b95a1fa9008831d439c4f999a5d065e3da3fe1e80b82d53c3e07–nghttp2-1.44.0.big_sur.bottle.tar.gz’
Error: Failure while executing; `tar –extract –no-same-owner –file /Users/zhaopengkang/Library/Caches/Homebrew/downloads/727a7b871748b95a1fa9008831d439c4f999a5d065e3da3fe1e80b82d53c3e07–nghttp2-1.44.0.big_sur.bottle.tar.gz –directory /private/tmp/d20211015-52303-1xq0k1l` exited with 1.

The error means: Error opening the archive file:

727a7b871748b95a1fa9008831d439c4f999a5d065e3da3fe1e80b82d53c3e07–nghttp2-1.44.0.big_sur.bottle.tar.gz,Then run the tar command to give you another backup.
All similar cases like this, directly install brew install XXX manually, and then re-execute the previous command.
I reported an error here run brew install nghttp2, re-execute brew install httpd, install successfully problem solved.

Read More: