I have some trouble installing python-mysqldb. The error I get is

E: Could not perform immediate configuration on 'gcc'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)

So I tried installing it using pip or easy_install and then I get this error:

unable to execute i486-linux-gnu-gcc: No such file or directory

error: command 'i486-linux-gnu-gcc' failed with exit status 1

And then I found out that I actually can't use 'i486-linux-gnu-gcc' but after finding the file I noticed that there is no such command but there is 'i486-linux-gnu-gcc-4.3'

So I created an alias and when I try it it works but pip and easy_install still say that the command can't be found so I assumed that they don't use my aliases. I tried to do an export but it says my identifier is not valid (while the alias works).

Please help me.


just tried

env 'i486-linux-gnu-gcc=i486-linux-gnu-gcc-4.3' pip install mysql-python

and still the same error.


Your .bashrc is not sourced by other programs or scripts. So aliases are not available. They are usually just for your interactive shells. You could link to the real command:

 $ cd /path/to/your/gcc-bin
 $ ln -s i486-linux-gnu-gcc-4.3 i486-linux-gnu-gcc

The ln command probably needs root rights.

If the path is not in your $PATH you have to add it. Take a look here.

  • I did this and now when I type "i486-linux-gnu-gcc" it says there is no such command. But I can see the link file – shym Aug 7 '13 at 11:11
  • Is the path in your $PATH? – ahilsend Aug 7 '13 at 11:14
  • echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin and the dir is /usr/lib/gcc So no. How to add it ? – shym Aug 7 '13 at 11:17
  • Look at Superuser: Environment variables – ahilsend Aug 7 '13 at 11:24
  • Ok I added it to my $PATH and still I get the not found error. Also when I try to use the command by myself It says the same, when I press "TAB" to autofill the command it adds the -4.3. Even whem i am in the path with the link file and want to use it, the same error appears. – shym Aug 7 '13 at 12:07

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