From murdoch at stats.uwo.ca  Tue Jan 15 00:25:30 2008
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Mon, 14 Jan 2008 18:25:30 -0500
Subject: [Rd] rm: failed to get attributes of `/':
In-Reply-To: <6afac6e60801091051p54234844oe963c9bc0f53fff7@mail.gmail.com>
References: <6afac6e60801091051p54234844oe963c9bc0f53fff7@mail.gmail.com>
Message-ID: <478BEF6A.1070908@stats.uwo.ca>

Recently I have heard reports like the one below a couple of times:

Tineke Casneuf wrote:
> However I did encouter an error when trying to install a self-made dummy
> package. I am sure it is not due to the package because it can be build on
> someone else's windows PC.
>
> The error message is *rm: failed to get attributes of `/': No such file or
> directory.
Today I saw one live, and managed to track down the problem.  Cygwin 
(from which the Windows R toolset gets a number of utilities), stores 
information on its mounts in the Windows registry.  If you later 
uninstall it but leave the registry entries in place, you'll get an 
error like the above.  The rm utility thinks that "/" refers to a 
directory like c:\cygwin, but such a directory doesn't exist.

I don't know if this is a bug in the Cygwin uninstaller (which I would 
say should remove registry entries once they are no longer valid), in rm 
(which should ignore mounts that don't make sense), or if it is user 
error.  But the fix is quite simple:  look in the registry (under 
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2, or the 
same location in HKEY_LOCAL_MACHINE), and remove any invalid mounts.

I will modify the Rtools installer to work around this problem.

Duncan Murdoch



[Rd] rm: failed to get attributes of `/':
Duncan Murdoch