#580152 dpkg: trigger - W: Unable to read /etc/apt/preferences.d/ - FileExists (2: No such file or directory)

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Jari Aalto
Date:
2025-08-12 09:49:02 UTC
Severity:
normal
#580152#5
Date:
2010-05-03 21:49:51 UTC
From:
To:
During upgrade under unstable:

       Processing triggers for menu ...
       W: Unable to read /etc/apt/preferences.d/ - FileExists (2: No such file or directory)

Could this be caused by the fact that here the /etc/apt is a symlink and
points to another location?

#580152#10
Date:
2010-05-03 23:02:29 UTC
From:
To:
reassign 580152 apt apt/0.7.25.3
thanks

Hi APT team,

Jari Aalto wrote:

To my untrained eye, this looks like a message from APT.  Any insights?

Full system information is at http://bugs.debian.org/580152

Thanks,
Jonathan

#580152#21
Date:
2010-05-04 08:23:06 UTC
From:
To:
Hi,

But it might an apt tool called from the menu trigger processing code.

Cheers,

#580152#26
Date:
2010-05-04 11:43:56 UTC
From:
To:
I checked all the menu-methods in Debian and none of them are calling
an apt tool, but you can try to run update-menus as root to see if that
displays this warning.

Cheers,

#580152#31
Date:
2010-05-04 12:16:07 UTC
From:
To:
Hi *,

2010/5/4 Raphael Hertzog <hertzog@debian.org>:
and/or warnings at the end so this is to 99% an error of the "main" apt.

Still, i don't know what this bugreport actually asks for:
The directory is included in the apt package so in a normal environment
it should be available after the correct installation of 0.7.22 and above.
And in an unnormal environment (in which directories magically disappear)
the warning is important… (user configuration could be disappeared too)

A linked /etc/apt isn't a problem (at least not for me).
The dir is btw by default empty - as is sources.list.d and trusted.gpg.d …

Best regards,

David Kalnischkies

#580152#36
Date:
2010-05-05 08:11:26 UTC
From:
To:
David Kalnischkies <kalnischkies+debian@gmail.com> writes:

At least the warning should be fixed. Is the error that it exists and
since when is a directory a file? Or that it doesn't? The two errors
contradict each other.

MfG
        Goswin

#580152#41
Date:
2010-05-06 09:55:18 UTC
From:
To:
2010/5/5 Goswin von Brederlow <goswin-v-b@web.de>:
E/W: generic apt error - method used (errno: strerror() with "exact" reason)

The plain reason is that we have a waste amount of possibilities why a file
is not readable: doesn't exist, broken link, insufficient rights, …
writing a message for all of them in APT would be insane.
On the other hand some of the error messages given by strerror() aren't
verbose and/or exact enough to be used alone, so the middle way was chosen.
(I think the Methodname is their to enable Error to do something special
with certain failures as noted in the Description of the file, but it is
unused so far - but from time to time useful to map (translated) error
messages to their untranslated equivalent in bugreports.


I have convert now this and a few other calls from FileExists() to
DirectoryExists() which was added recently to check if it is really a
directory and not a file, but this doesn't change much…

Any further suggestions?


Best regards,

David Kalnischkies

#580152#46
Date:
2010-05-06 10:53:55 UTC
From:
To:
David Kalnischkies <kalnischkies+debian@gmail.com> writes:
signify that the first is a location (the function causing the error)
and not the error message itself. Or:

W: Unable to read /etc/apt/preferences.d/ in FileExists(): (2) No such file or directory

More usefull I guess would be the name of the calling function since, as
you say, lots of places will check if a file exists.

MfG
        Goswin

#580152#51
Date:
2021-09-22 04:26:15 UTC
From:
To:
Hello,

Good morning,

We have gone through your samples from a partner and Here is our  Order
List. Please do bear in mind that we are very much in  need of this
order, quote your competitive prices.

Kindly send the Order confirmation.

Your early reply will be much appreciated.

Best Regards,

Maryanah Erwin.

PT FINDORA INTERNUSA

Jln Pahlawan 66 Kec. Arjawinangun

45162 CIREBON West-Java INDONESIA

tel : +62 231 357334

fax: +62 231 357260

email: marketing@findora.com

#580152#56
Date:
2023-04-08 06:51:09 UTC
From:
To:
I ran into this recently.

For .d directories like /etc/apt/preferences.d, it'd be nice if apt were
silent about the directory not existing, and if it just treated that the
same as an empty directory.

#580152#61
Date:
2025-08-12 09:46:21 UTC
From:
To:
Refer to attachment for more information.



Thanks. Regards