Mac下的nmap及brew

  新的Ventura貌似没有内置nmap命令了,搜了下,可以通过brew install nmap安装。但是brew install过程中踩了几个坑:

1、报not in git directory。找个是git认为homebrew-core、homebrew-cask、homebrew-services目录认为是不安全目录,执行一下:

git config --global --add safe.directory 你的homebrew-core路径
git config --global --add safe.directory 你的homebrew-cask路径
git config --global --add safe.directory 你的homebrew-services路径
#执行brew -v 可以看到具体有问题的目录

 2、报man目录不可写:执行一下:chmod -Rf a+w /usr/local/share/man/*

3、报nmap未link,执行brew link nmap,这个基本上是因为之前安装的别的版本的nmap没删干净导致的。brew remove nmap,然后找到剩下的nmap的目录都删掉再重装。

 

posted @ 2023-01-09 14:46  badwood  阅读(788)  评论(0编辑  收藏  举报
Badwood's Blog