Mac OS X 10.6 executable not found without full path
- by Danack
I just installed Apache via MacPorts. It seems that my Mac was absolutely confused about which version of the Apache executables to run.
After moving the Apache executables that ship with the Mac to a directory that is not listed in the PATH variable, trying to run the httpd built by MacPorts fails even though the correct directory (/opt/local/apache2/bin) is listed in the PATH variable.
If I navigate to the directory /opt/local/apache2/bin and type the command httpd I still get the error message
-bash: httpd: command not found
If I type the command with the full path /opt/local/apache2/bin/httpd it works fine.
I've run the command alias to see if something was clashing but the only thing listed is:
alias wget='curl -O'
How do I find what is intercepting the command and preventing the executable being found in the directory, even when I'm inside the same directory?
By the way, the httpd file is executable:
-rwxr-xr-x 1 root admin 442496 9 May 2012 httpd