0

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.

Edit:

just tried

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

and still the same error.

shym
  • 101
  • 2

1 Answers1

0

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.

ahilsend
  • 101
  • 3
  • 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 07 '13 at 11:11
  • Is the path in your `$PATH`? – ahilsend Aug 07 '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 07 '13 at 11:17
  • Look at [Superuser: Environment variables](http://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them/284361#284361) – ahilsend Aug 07 '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 07 '13 at 12:07
  • Well, where did you add it? If you added it to the .bashrc or .profile your current shell doesn't know about it. You'd have to source it again: `source ~/.bashrc`, or start a new shell. – ahilsend Aug 07 '13 at 12:12
  • I don't know. I typed `export PATH=$PATH:/usr/lib/gcc` and it is in the PATH now. Just as that link said. I dont know nothing about .bashrc or .profile, I don't event know what a shell is. – shym Aug 07 '13 at 13:30