Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`brew link unbound` returns `/usr/local/sbin is not writable` error

I'm trying to install unbound using brew command.

Here's output for brew install unbound:

Warning: unbound 1.6.7 is already installed, it's just not linked.
You can use `brew link unbound` to link this version.

As you can see, I was asked to use brew link unbound to link to unbound 1.6.7.

But I failed to link to it because I got the following error:

Linking /usr/local/Cellar/unbound/1.6.7...
Error: Could not symlink sbin/unbound
/usr/local/sbin is not writable.

I've the other stackoverflow here.

And the answer sudo chown -R $(whoami) /usr/local creates the following error:

chown: /usr/local: Operation not permitted

I'm using macOS High Sierra Version 10.13.2.

How can I solve this problem?

like image 824
Brian Avatar asked Mar 08 '23 03:03

Brian


1 Answers

The following commands solved my problem.

sudo mkdir /usr/local/sbin
sudo chown -R $(whoami) /usr/local
brew link unbound
like image 91
Brian Avatar answered Mar 09 '23 17:03

Brian