problem after apt-get update command
Solution 1
For the GPG errors, run sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220 40976EAF437D05B5
to import the keys.
For the MergeList problem, run sudo rm /var/lib/apt/lists/*
.
Finally, run sudo apt-get update
.
Solution 2
To summarise the instructions from saiarcot895 :
For an error like this
W: GPG error: http://archive.ubuntu.com trusty Release:
The following signatures were invalid: BADSIG [ some_number ]
Ubuntu Archive Automatic Signing Key <[email protected]>
do this - preferably one instruction at a time -
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [ some_number ]
cd /var/lib/apt
ls -la
sudo mv lists lists_bak
sudo mkdir -p lists/partial
apt-get update
which is roughly
- call
gpg
viaapt-key
viaapt-get
, to download a new key - go to where
apt
keeps its data - look at the data that
apt
has at the moment - rename the
apt
cache directory to both back it up and clear the cache - make a new
apt
cache directory - update the cache of packages that
apt
knows about
Related videos on Youtube
user297975
Updated on September 18, 2022Comments
-
user297975 over 1 year
Recently , i tried to install google earth from Ubuntu tweak . the programme asked me to add the repository of google earth . well,after i do the command i found that an error message that told me that i couldn't add the source and the system can't build packages tree.i run in terminal
sudo apt-get update
and i found following Errors:Fetched 143 kB in 3min 43s (637 B/s) Reading package lists... Error! W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures were invalid: BADSIG 6AF0E1940624A220 Launchpad PPA for TualatriX W: GPG error: http://eg.archive.ubuntu.com trusty-backports Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]> E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/eg.archive.ubuntu.com_ubuntu_dists_trusty_multiverse_i18n_Translation-en%5fUS E: The package lists or status file could not be parsed or opened.
I can't launch Ubuntu software center.and a minus mark appear in bar at the top of the screen . please tell me what should i do in steps please.i have Ubuntu 14.04 trusty tahr.
-
user297975 almost 10 yearsi get this:E: GPG error: archive.canonical.com trusty InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)
-
user297975 almost 10 yearsand this:W: GPG error: eg.archive.ubuntu.com trusty-backports Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]>
-
user297975 almost 10 yearsdo they the same solution or not?
-
user297975 almost 10 yearstake that too W: Failed to fetch eg.archive.ubuntu.com/ubuntu/dists/trusty/multiverse/i18n/… Connection failed [IP: 91.189.91.13 80]
-
saiarcot895 almost 10 years@user297975: The GPG warning about the invalid signature should have been gone. For the failed to fetch warning, you can ignore that, since it's just a translation file. For the NODATA error, see here for a possible answer.
-
user297975 almost 10 yearsthanks,but if i face another GpG error ,i should type the same command or i should change something.failed to fetch warning does it have any bad effects on the system i face it alot.
-
user297975 almost 10 yearssorry i have tired you. but the problem back again the red mark back ,ubuntu center doesnot work 'apt-get update'output is 'W: Failed to fetch gzip:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_trusty-security_main_source_Sources Hash Sum mismatch'sorryyy again for Disturbance
-
user297975 almost 10 yearsgpg error again. it seems to be disease.
-
user297975 almost 10 yearsthe command about mergelist problem output this'rm: cannot remove ‘/var/lib/apt/lists/eg.archive.ubuntu.com_ubuntu_dists_trusty_multiverse_i18n_Translation-en%5fUS’: No such file or directory'after doing the first command on your answer
-
user297975 almost 10 yearshelp me anybody.
-
user297975 almost 10 yearsit doesn't work in terminal .i went to apt and found a file named lists should i remove all files on it. i can by giving the file the permission from this command chmod 0777 the directory i should remove files which written on html or remove any thing on this file
-
user297975 almost 10 yearsi found this in terminal rm: cannot remove ‘/var/lib/apt/lists/partial’: Is a directory
-
saiarcot895 almost 10 years@user297975: First off, don't change permissions of directories unless you know why you're doing it and that you really need to do it. Second, I had a slight typo in the command I posted in my comment; it should be
sudo rm /var/lib/apt/lists/*
. Third, the error message is fine; thepartial
directory can stay. -
user297975 almost 10 yearsthanks , i gave up i install the system again.thanks again for your patience .
-
mc0e over 8 yearsDoes downloading the gpg key without checking it open you up to man in the middle attacks? What sort of checking should be performed to be sure that the key you're adding is what it's supposed to be?
-
saiarcot895 over 8 years@mc0e: It might, under certain circumstances. If you specify only the last 8 hex characters of the key, and there happens to be a collision, you might get the wrong key. But even then, though, the repo will still be considered untrusted because the key you downloaded is a different key. I'm not a security expert, so take what I said with a grain of salt. Also, you might be better off asking/searching over on Information Security.