Error: The following directories are not writable by your user: /usr/local/share/man/man8

Error: The following directories are not writable by your user: /usr/local/share/man/man8

今天使用macos安装telnet时,系统提示错误信息,如下:

➜  ~ brew install telnet
Error: The following directories are not writable by your user:
/usr/local/share/man/man8

You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /usr/local/share/man/man8

And make sure that your user has write permission.
  chmod u+w /usr/local/share/man/man8

这个错误很好解决,按照第一个提示输入命令即可解决,如下示例:

sudo chown -R `whoami`:admin /usr/local/share/man/man8

输入完直接回车即可,然后再执行brew install telnet即可,如下:

➜  ~ brew install telnet                                   
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/telnet-63.big_sur.bottle.tar.gz

curl: (22) The requested URL returned error: 404 
Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/telnet/manifests/63
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/telnet/blobs/sha256:e6fb7de53e703755a72e227752f81023c2935567d935af63895
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:e6fb7de53e703755a72e227752f81023c29
######################################################################## 100.0%
==> Pouring telnet--63.big_sur.bottle.tar.gz
  /usr/local/Cellar/telnet/63: 4 files, 174.7KB
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/david/Library/Caches/Homebrew/yarn--1.22.17_2.all.bottle.tar.gz... (1.2MB)
Removing: /Users/david/Library/Caches/Homebrew/portable-ruby-2.6.8.yosemite.bottle.tar.gz... (8.8MB)
Removing: /Users/david/Library/Logs/Homebrew/yarn... (64B)

你可能感兴趣的:(mac,后台,运维,macos,telnet,brew)