How to make pip or easy_install use aliases

Posted on

How to make pip or easy_install use aliases – Problems with loading a website are often blamed on the Internet connection, but even the most perfectly set up network cannot help if there is no service to reply at your destination. One of the most popular HTTP servers used for this task is Apache2. Much of Apache’s popularity can be attributed to its easy installation and use, but never the less it is possible to run into problems with even the easiest of the software. If you’ve encountered an issue loading your web page, follow these simple troubleshooting methods outlined in this guide to attempt to get your web server back up and working again. Below are some tips in manage your apache2 server when you find problem about apache-2.2, python, pip, easy-install, .

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.

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.

Leave a Reply

Your email address will not be published.