Build Error on OSX: unable to execute /: Permission denied
MySQL database connector for Python programming
Brought to you by:
adustman
Mac OSX: 10.8.4
Python: 2.7.5
MySQL: 5.6.12-osx10.7-x86_64
Xcode: 4.6.3
MySQL-python: 1.2.4
Got this error when doing pip install mysql-python
and got the same error when trying to install it from source (below):
$ python setup.py install running install running bdist_egg running egg_info writing MySQL_python.egg-info/PKG-INFO writing top-level names to MySQL_python.egg-info/top_level.txt writing dependency_links to MySQL_python.egg-info/dependency_links.txt reading manifest file 'MySQL_python.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'MySQL_python.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.6-intel/egg running install_lib running build_py copying MySQLdb/release.py -> build/lib.macosx-10.6-intel-2.7/MySQLdb running build_ext building '_mysql' extension / A p p l i c a t i o n s / X c o d e . a p p / C o n t e n t s / D e v e l o p e r / T o o l c h a i n s / X c o d e D e f a u l t . x c t o o l c h a i n / u s r / b i n / c l a n g - f n o - s t r i c t - a l i a s i n g - f n o - c o m m o n - d y n a m i c - a r c h i 3 8 6 - a r c h x 8 6 _ 6 4 - g - O 2 - D N D E B U G - g - O 3 -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o -Wno-null-conversion -Os -g -fno-strict-aliasing -arch x86_64 unable to execute /: Permission denied error: command '/' failed with exit status 1
Something derpy is going on with your setuptools or distribute or whatever.
Now you say you're running Mac OSX 10.8.4 (Mountain Lion), but your output says your running 10.6 (Snow Leopard). Did you recently upgrade, and if so, did you upgrade Xcode as well? Is this Python 2.7.5 the system python, or is it from some other source?
Can't duplicate on Snow Leopard with Python 2.7.3 from MacPorts.
Here are the installed packages:
I formatted and reinstalled OSX 10.8.3 three days ago and upgraded to 10.8.4 shortly after.
Installing other packages worked fine, but then again the other packages did not require a native compiler. I've just tried downgrading to Xcode 4.4.1 and still got the same problem...
Hi Andy,
Thanks for pointing out MacPorts, I found out what the problem was from there. When trying to install MacPorts, I had to install the Xcode command line tools. After installing it, I decided to try it building mysql-python again and it worked!
The error message wasn't so obvious, but it seems to be caused by having Xcode, but not the Xcode command line tools.
Thanks a bunch.
By the way, I didn't see this documented anywhere, though hopefully I didn't just miss it.
I'm fairly new to Mac and didn't know Xcode command line tools were required (though I did find it strange that
gcc
,clang
, etc. wasn't in the path but a compiler was detected after Xcode was installed). Even though this is probably a noobish problem, please consider adding this to the documentation as it may help others.Thanks