Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install the python module mysqldb which is the python interface for mysql. I need this module because I am creating a Django development server (Django 1.4, OpenSUSE) and the database package I wish to use is mysql. This is the tutorial I am following: https://docs.djangoproject.com/en/1.4/ref/databases/#mysql-notes

I am using virtualenv, and inside my virtual environment I am executing this command:

$ pip install mysql-python

My first error was that the 'mysql_config' command was not found. After some reading I went into yast to install 'libmysqlclient-devel' which is defined as 'MariaDB development header files and libraries'. I do not have MariaDB installed, just mysql. I don't know if this will make a difference. After installing that, I type the same command and now have this error:

$ pip install mysql-python

unable to execute gcc: No such file or directory

error: command 'gcc' failed with exit status 1

I have no idea what this is. Before I came here I read some things about python-dev tools but I can't find any package for that in yast or any modules in pip search. Anyone know what this error means?

share|improve this question

1 Answer

up vote 0 down vote accepted

Your system is probably missing the gcc package. To install on OpenSUSE you can either use YAST or Zypper. From a shell:

% sudo zypper install gcc

-or-

% sudo zypper in gcc

You may need additional packages to just the compiler as well. Here's a link to zypper's users guide. You may be able to get away with doing a zypper install gcc* as well. Not sure how many other packages fall under gcc* though.

Also depending on the application you're trying to build you may need g++, zyper install gcc-g++.

share|improve this answer
Thank you. I needed the gcc, make, and python-devel packages. Much appreciated! – jeff fabiny Apr 24 at 14:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.