Simlink does not work properly

kristiyan brew --prefix
/usr/local
~
kristiyan brew info imagemagick
imagemagick: stable 7.0.9-20 (bottled), HEAD
Tools and libraries to manipulate images in many formats
https://www.imagemagick.org/
/usr/local/Cellar/imagemagick/7.0.9-20 (1,480 files, 24.0MB)
Poured from bottle on 2020-02-05 at 23:25:51
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/imagemagick.rb
==> Dependencies
Build: pkg-config ✘
Required: freetype :heavy_check_mark:, jpeg :heavy_check_mark:, libheif :heavy_check_mark:, libomp :heavy_check_mark:, libpng :heavy_check_mark:, libtiff :heavy_check_mark:, libtool :heavy_check_mark:, little-cms2 :heavy_check_mark:, openexr :heavy_check_mark:, openjpeg :heavy_check_mark:, webp :heavy_check_mark:, xz :heavy_check_mark:
==> Options
–HEAD
Install HEAD version
==> Analytics
install: 130,266 (30 days), 365,995 (90 days), 1,279,438 (365 days)
install-on-request: 95,273 (30 days), 266,264 (90 days), 916,792 (365 days)
build-error: 0 (30 days)
~
kristiyan brew link imagemagick
Linking /usr/local/Cellar/imagemagick/7.0.9-20…
Error: Could not symlink include/ImageMagick-7/Magick++/Blob.h
/usr/local/include/ImageMagick-7/Magick++ is not writable.

What does ls -al /usr/local say?

Blockquote
kristiyan ls -al /usr/local
total 0
drwxr-xr-x 17 root wheel 544 Feb 5 23:22 .
drwxr-xr-x@ 9 root wheel 288 Sep 21 04:32 …
-rw-r–r-- 1 root wheel 0 Dec 3 09:43 .com.apple.installer.keep
drwxrwxr-x 2 kristiyan admin 64 Feb 5 23:22 Caskroom
drwxrwxr-x 30 kristiyan admin 960 Feb 5 23:31 Cellar
drwxrwxr-x 4 kristiyan admin 128 Feb 5 23:24 Frameworks
drwxrwxr-x 20 kristiyan admin 640 Feb 5 23:33 Homebrew
drwxrwxr-x 177 kristiyan admin 5664 Feb 5 23:37 bin
drwxrwxr-x 5 kristiyan admin 160 Feb 5 23:37 etc
drwxrwxr-x 45 kristiyan admin 1440 Feb 5 23:31 include
drwxr-xr-x 3 root wheel 96 Sep 30 14:30 jamf
drwxrwxr-x 125 kristiyan admin 4000 Feb 5 23:31 lib
drwxr-xr-x 5 root wheel 160 Feb 5 10:48 libexec
drwxrwxr-x 40 kristiyan admin 1280 Feb 5 23:37 opt
drwxrwxr-x 3 kristiyan admin 96 Feb 5 23:23 sbin
drwxrwxr-x 26 kristiyan admin 832 Feb 5 23:31 share
drwxrwxr-x 3 kristiyan admin 96 Feb 5 23:22 var

Anything else you would like me to provide ?

ls -la /usr/local/include

https://pastebin.com/tiAeRGHb

Here are the magic permissonls as well :slightly_smiling_face:

Blockquote
kristiyan cd ImageMagick-7/
/usr/local/include/ImageMagick-7
kristiyan ls
Magick++ MagickCore MagickWand
/usr/local/include/ImageMagick-7
kristiyan ls -la
total 0
drwxr-xr-x 5 root wheel 160 Jan 26 21:11 .
drwxrwxr-x 45 kristiyan admin 1440 Feb 5 23:31 …
drwxr-xr-x 2 root wheel 64 Jan 26 21:11 Magick++
drwxr-xr-x 2 root wheel 64 Jan 26 21:11 MagickCore
drwxr-xr-x 2 root wheel 64 Jan 26 21:11 MagickWand
/usr/local/include/ImageMagick-7

guys i really need help :slight_smile: at this point i consider unistalling brew only because of the poor user experience i got.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link on these:
imagemagick
~
kristiyan brew link imagemagick
Linking /usr/local/Cellar/imagemagick/7.0.9-21…
Error: Could not symlink include/ImageMagick-7/Magick++/Blob.h
/usr/local/include/ImageMagick-7/Magick++ is not writable.

You ran something as root that ruined the permissions. This can’t be a brew command because homebrew thinks sudo is bad. The only way to restore this is to run sudo chown -R $(whoami) /usr/local/*

Thank you i definitelly hope i dont experience any more problems with brew. I’ve never had such problems with arch and pacman.

Pacman requires root, so if it goes wrong for some reason, it could very well toast your system. Homebrew…has no such problems.

Since Homebrew doesn’t need root, it’s something else (or someone else) that broke your ImageMagick install. You might want to figure out who/what that is, before your system is changed in ever-more-bizarre ways.