Switching from one Mac to another and Homebrew issues

Share this post:

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.

Over 10 years in business.

Self-funded. No investors. No bullshit.

More than 3,000 customers worldwide.

Helpmonks - no bullshit customer engagement service

Growth starts with action

Empower your team and delight your customers.

Helpmonks - email management for small businesses