When running brew doctor ‘ ? Formula / serf.rb ‘.How to solve this problem?

when running brew doctor ‘ ?? Formula / serf.rb ‘As shown in the figure below, you can see that the referenced files exist in the folder. How to solve this problem?

The critical details are missing from your screenshot. Please post the output of brew config and brew doctor as text, not images.

It looks like the output of brew doctor on your system is too long to select manually from your Terminal window, so do this:

brew doctor 2>&1 | pbcopy

to automatically copy it to the macOS clipboard, then you can paste it on this forum, in a pastebin, or a GitHub gist.