Apple - Homebrew doctor warning: you have unlinked kegs in your Cellar
Like this, for each unlinked keg:
brew link imagemagick
i ran below command and the problem is gone...
"brew upgrade"
brew link --overwrite imagemagick
repeat it for each and it will solve the issue