bad path in bash

Nils Kassube kassube at gmx.net
Mon Mar 23 19:40:48 UTC 2009


Walton Hoops wrote:
> So I've built MySQL from source as the version in the repository does
> not support partitioning.  Got it installed, running, all is well and
> good.. Until.
>
> root at grunt:/usr/local# mysql
>
> bash: /usr/bin/mysql: No such file or directory
>
> root at grunt:/usr/local# which mysql
>
> /usr/local/bin/mysql
>
> root at grunt:/usr/local# ls -l /usr/local/bin/mysql
>
> -rwxr-xr-x 1 root root 340157 2009-03-23 11:48 /usr/local/bin/mysql
>
> root at grunt:/usr/local# /usr/local/bin/mysql --password
>
> Enter password:

I would assume you had started mysql previously from the version 
installed from the Ubuntu repository. Then bash still knew the cached 
path to the now uninstalled executable. Try "hash -l" to find out which 
commands are cached. And with "hash -r" you can clear the list.


Nils




More information about the ubuntu-users mailing list