LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get update error (https://www.linuxquestions.org/questions/debian-26/apt-get-update-error-4175627172/)

boycottsystemd 04-07-2018 01:36 AM

apt-get update error
 
Code:

W: http://security.debian.org/dists/stretch/updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://ftp.us.debian.org/debian/dists/stretch-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://ftp.us.debian.org/debian/dists/stretch/Release.gpg: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key.

I have tried
Code:

apt-get install --reinstall debian-archive-keyring
apt-get autoclean
apt-get clean

but it didn't help.

Code:

$ lsb_release -a
No LSB modules are available.
Distributor ID:        Debian
Description:        Debian GNU/Linux 9.4 (stretch)
Release:        9.4
Codename:        stretch


pan64 04-07-2018 03:33 AM

at first, this is not an error message but a warning (or three).
Please post the exact steps you executed, not only a message.... (which user, which command, full output...).
Also did you check the permissions on that file?

boycottsystemd 04-07-2018 03:48 AM

Code:

rm /etc/apt/trusted.gpg
recommended here http://forums.debian.net/viewtopic.php?t=130558

has solved the issue.

So I hope it's correct solution.

AwesomeMachine 04-13-2018 10:48 PM

If you're working as root, but the keyring is not readable, that means no one can read it. So, have a look at the permissions. I really wonder how it got that way!

boycottsystemd 04-21-2018 12:54 AM

Quote:

Originally Posted by AwesomeMachine (Post 5842950)
So, have a look at the permissions. I really wonder how it got that way!

I'm sorry the file is deleted.

Maybe 8 --> 9 upgrade ?

Joaquim 10-26-2018 07:33 PM

Quote:

Originally Posted by pan64 (Post 5840295)
at first, this is not an error message but a warning (or three).
Please post the exact steps you executed, not only a message.... (which user, which command, full output...).
Also did you check the permissions on that file?

sorry to reopen this tread but...
i have 2 diferent systems with the exact same problem, related to this one. In both i installed a debian system stretch with Lxde and gnome...
i tried to add debian multimedia but i keep getting the message saying
"The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key."
tired of reading and not geting nowhere.
I followed the sugestion on a brazilian forum (iḿ Portuguese...) to remove /etc/apt/trusted.gpg and to run apt-key update...

problem is console gives me the answer :
root@debiansala:/etc/apt# apt-key update
Warning: 'apt-key update' is deprecated and should not be used anymore!
Note: In your distribution this command is a no-op and can therefore be removed safely.

this one i dont see a solution... itś been two months (the system is funcional and i dont use them that often...) and some body else should had the same problem but i cant see the answer...

help apretiated

Joaquim 10-26-2018 08:51 PM

answering my self...
i fixed some other issue reading the foruns... how to find and add the gpg keys.
apt-get and synaptic give the error but recognise the repository...
i find and extraxct the key "deb-multimedia-keyring_2016.8.1_all.deb" and placed it in the trusted.gpg.d folder...
never the less that behavior should be corrected and still don't know an alternaticve to do it manually...

nodir 10-26-2018 11:23 PM

I haven't heard of the multimedia repo in ages.
Anyway: most recommend very strongly against using it.

This way or that way: might be it should be corrected, but that is not a problem of debian.org, but the multimedia-repo.

pan64 10-27-2018 04:41 AM

you don't need to use apt-get, but simply apt.

Snoozyman 11-22-2019 08:53 AM

Sorry to necro this, but I found an workaround that seems to be working at least to me!

Modify the permissions of the .gpg file in question to 666 and then it run the apt/(-get) update again.

Like in my case:

Code:

Reading package lists... Done
W: //ftp.fi.debian.org/debian/dists/buster/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/microsoft.asc.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: //ftp.fi.debian.org/debian/dists/buster-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/microsoft.asc.gpg are ignored as the file is not readable by user '_apt' executing apt-key.

chmod 666 /etc/apt/trusted.gpg.d/microsoft.asc.gpg
apt-get update

Get:9 //packages.microsoft.com/debian/10/prod buster/main all Packages [556 B]
Fetched 18.3 kB in 1s (20.2 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.



All times are GMT -5. The time now is 03:05 PM.