Trying to add the MySQLdb Module to my Splunk Python for Splunk scripted inputs from a db. It is complaining about gcc-4.2 Is there any suggestions on a safe way to add it or find it?
mysplunkmachine:MySQL-python-1.2.3 splunker$ sudo python setup.py install
writing top-level names to MySQLpython.egg-info/toplevel.txt
writing dependencylinks to MySQLpython.egg-info/dependencylinks.txt
reading manifest file 'MySQLpython.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
writing manifest file 'MySQLpython.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-universal/egg
copying MySQLdb/release.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
building 'mysql' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLEDTRACE -pipe -Dversioninfo=(1,2,3,'final',0) -Dversion=1.2.3 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c mysql.c -o build/temp.macosx-10.6-universal-2.6/mysql.o -g -Os -arch x8664 -fno-common -DP10031BVISIBLE -DSIGNALWITHVIOCLOSE -DSIGNALSDONTBREAKREAD -DIGNORESIGHUPSIGQUIT -DDONTDECLARECXAPUREVIRTUAL
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1
This really isn't a Splunk question, but it's been here forever and has double points so I'll try. 😄
It looks like you are compiling on an OS X machine. Normally
gcc is not named
gcc-4.2. Make sure your system has the
gcc compiler - you may need to install it either from a ports package or install XCode. (My imac at home has XCode and has /usr/bin/gcc but not /usr/bin/gcc-4.2)
You have a variety of possible paths:
make sure you have gcc installed, then hack in a symlink to gcc-4.2 -> gcc like this
sudo ln -s /usr/bin/gcc /usr/local/bin/gcc-4.2