Hi,
Has anyone seen such error? Can someone please help me solve the error?

When trying selfupdate or install a port, I got error stated in subject.  I have checked mailing lists and googled for the error but I couldn't find any similar incident.

This happend on 1.4.0, so I have wiped the installation as shown in http://trac.macosforge.org/projects/macports/wiki/FAQ#HowdoIremoveoruninstallMacPorts . Then installed 1.5.0 from source. The error still occurs and I cannot selfupdate nor install any ports.

If you require any other information, please let me know.

= Here is output of the selfupdate

> sudo port -d selfupdate
..
..

tests/test/xcodeversion/

sent 69 bytes  received 5500 bytes  2227.60 bytes/sec
total size is 3647765  speedup is 655.01
Downloaded MacPorts base version 1.600
Configuring, Building and Installing new MacPorts base
DEBUG: couldn't create error file for command: no such file or directory
    while executing
"exec /usr/bin/whoami"
    (procedure "macports::selfupdate" line 64)
    invoked from within
"macports::selfupdate [array get global_options]"
Error: /opt/local/bin/port: selfupdate failed: couldn't create error file for command: no such file or directory