Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 572
add-semi-colons Avatar asked Jul 01 '13 01:07

add-semi-colons


2 Answers

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

like image 197
Sairam Krish Avatar answered Oct 07 '22 00:10

Sairam Krish


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.

like image 22
apadana Avatar answered Oct 07 '22 00:10

apadana