Homebrew aspell directory not writable

296 Views Asked by At

I am having some difficulties. This started with a broader question but I seem (with some help from this list) to have narrowed things down a bit. My original query is at Emacs - Kieran Healy's Emacs Starter Kit aspell English dictionery

(And, yes, I am embarrassed at the spelling error in the title).

I have narrowed (with some help from that question) to narrow my problem down to the Homebrew installation of aspell. The command brew install aspell gives the following error.

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/aspell-0.60/american-variant_0.alias
/usr/local/lib/aspell-0.60 is not writable.

You can try again using:
brew link aspell

If I try brew link aspell I get the following error:

Linking /usr/local/Cellar/aspell/0.60.6.1_1... 
Error: Could not symlink lib/aspell-0.60/american-variant_0.alias
/usr/local/lib/aspell-0.60 is not writable.

File permissions on aspell are

drwxr-xr-x  89 root  wheel  2848  7 Nov  2016 aspell-0.60

brew doctor gives

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:
aspell

It also tells me I need to update from XCode 9.3 to XCode 10.1, but since I am still running MacOS 10.13.4, I think I do not need to do this.

Any help greatly appreciated.

1

There are 1 best solutions below

0
On

The info at Homebrew: Could not symlink, /usr/local/bin is not writable was helpful. I had to sudo chown -Rwhoami:admin /usr/local/lib. Then after unintalling and reinstalling aspell with Homebrew, I had to brew link --overwrite aspell. Everything works now.