Man nmap goes gibberish after brew upgrade nmap

After executing brew upgrade to install the latest version(7.70) of nmap, there appeared a failed link to ncat, with some possible conflict files related to man listed, then I followed the advice provided by homebrew, executed the following commands:

rm '/usr/local/bin/ncat'
brew link --overwrite nmap
brew link --overwrite --dry-run nmap

It seemed that all the thing went well, but when I executed man nmap, the appeared page was a mess of codes, it went gibberish like this:


I had tried reinstall the nmap but it didn’t work.
So can anyone help me and tell me how can I fix this problem?

I had solved this problem myself by just simply deleting the conflict files under /usr/local/share/man/, including


The issue with nmap is that the ownership for man/de is wrong. It causes even fresh installs to hang.

I did a chown -R and a chgrp -R and then it went smoothly. So it is a small problem the install script.