Homebrew doctor warning: you have unlinked kegs in your Cellar

Solution 1:

Like this, for each unlinked keg:

brew link imagemagick

Solution 2:

i ran below command and the problem is gone...

"brew upgrade"