[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/alternatives contains files



On 2012-02-29 17:26 +0100, Bob Brewer wrote:

> Some packages failed to upgrade in my lenny to squeeze update because 
> updare-alternatives encountered a file rather than a symbolic link. An 
> example of this was fakeroot which produced the error:
>
> "update-alternatives: error: readlink(/etc/alternatives/fakeroot) 
> failed: Invalid argument"

This is not a particular useful error message, but it seems to have been
fixed in the wheezy dpkg¹.

> The file (/etc/alternatives/fakeroot) contains a shell script which has 
> the comment:
>
> "# This script first starts faked (the daemon), and then it will run
> # the requested program with fake root privileges."
>
> After I moved this file out of the way I was able to upgrade the package 
> fakeroot and new symbolic links were generated.
>
> There are over 100 of these files in the /etc/alternatives directory all 
> dating from the same date in 2008 and presumably left over from a 
> previous upgrade.

That was not supposed to happen, but it is probably too late to find out
the reason for the problem.

> Would it be safe to delete these files and run update-alternatives to 
> generate new symbolic links.

This is probably your best choice.  Make backups of the
/etc/alternatives and /var/lib/dpkg/alternatives directories before you
do that, though.

Sven


¹ http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=commit;h=c922a8f681dc27135947ebdaff68fc3158614807


Reply to: