Helpmonks Logo

Switching from one Mac to another and Homebrew issues

Switching from one Mac to another and Homebrew issues

As I’ve just switched from one Mac to another I’ve experienced an issue with the Homebrew installation. Whatever I did I received a message of;

fatal: Unable to create ‘/usr/local/.git/index.lock’: Permission denied

or something like;

Permission denied – /usr/local/opt/pkg-config

As I’ve migrated all user accounts and applications it should have done everything for me, right? Well, as it turns out the /usr/local directory was owned by another user (the initial user even thought the user was removed). In short, you have to change the permission with:

[code]sudo chown -R (user):admin /usr/local[/code]

(you need to replace the (user) above with your user name)

Voila. All works again.

Nitai

Nitai

Founder & CEO of Helpmonks. Serial Entrepreneur. Getting things done.