add-semi-colons
add-semi-colons

Reputation: 18800

Brew Install Python Fails Due to Link gdbm link issue

I am used to macport and recently got a new mac book pro 10.8.4, and I switched brew and tried to install python but I am getting following error:

brew install python --universal --framework
Error: You must `brew link gdbm' before python can be installed

I tried to follow following links to install python using brew but it was keep saying about link, which I don't understand. WebSite 1, webSite 2

Here are the warnings that I get:

 brew install readline sqlite gdbm
Warning: readline-6.2.4 already installed
Warning: sqlite-3.7.17 already installed
Warning: gdbm-1.10 already installed, it's just not linked

In addition to this I have tried to link it brew link gdbm but I get the following permission issue:

file: /usr/local/Cellar/gdbm/1.10/include/gdbm.h
/usr/local/include is not writable. You should change its permissions.

I check the /usr/local/include and it has a write permission

drwxr-xr-x  29 root      wheel    986 Mar 30 16:46 include ( I am not the root) 

I am not the root and don't have the root password, but I do have sudo rights on the machine.

Upvotes: 9

Views: 11101

Answers (3)

josesuero
josesuero

Reputation: 3760

this worked for me

brew unlink gdbm && brew link gdbm

Upvotes: 1

apadana
apadana

Reputation: 14620

Running

brew doctor 

and clearing warnings should fix the problem. It will point out a few warnings. Fixing those warnings should let brew install python with no problem afterward.

Upvotes: 5

Sairam Krish
Sairam Krish

Reputation: 11661

I had the same issue., Try to change the ownership of the directory (recursively)

sudo chown -R username:admin /usr/local/include

In the above command., replace the username with your username. This should resolve the issue

Upvotes: 17

Related Questions