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?
my_splunk_machine:MySQL-python-1.2.3 splunker$ sudo 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'
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-universal/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
running build_ext
building 'mysql' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(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 x86_64 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1
Any help?
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
Hello,
Same issue.
Did you found the solution ?
Thanks.