AIX sometimes leaves ".nfsEBD1F5" files around. Have seen this error while installing python - listdir() might have seen it, but subsequent copy_file() failed, because AIX removed it in the meantime. copying build/lib.aix-5.3-2.5/dl.so -> /eprefix/var/tmp/portage/dev-lang/python-2.5.1-r5/image/eprefix/usr/lib/python2.5/lib-dynload error: can't copy 'build/lib.aix-5.3-2.5/.nfsEBD1F5': doesn't exist or not a regular file make: *** [sharedinstall] Error 1 Solaris NFS does the same. So, just ignore files starting with ".nfs". --- Lib/distutils/dir_util.py +++ Lib/distutils/dir_util.py @@ -158,7 +158,9 @@ src_name = os.path.join(src, n) dst_name = os.path.join(dst, n) - if preserve_symlinks and os.path.islink(src_name): + if n.startswith('.nfs'): + pass # do not consider NFS cache (?) files + elif preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) log.info("linking %s -> %s", dst_name, link_dest) if not dry_run: