这些方法对我都没有起作用:
$ sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 5072E1F5
或者
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5
或者
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
这些来源是:
https://bugs.mysql.com/bug.php?id=85029 和
https://bugs.mysql.com/bug.php?id=94378
我在绝望中进行了一个可疑的操作(在下面说“y”而不是“N”),我认为这根本不需要:
$ sudo apt-get install mysql-apt-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
mysql-apt-config
1 upgraded, 0 newly installed, 0 to remove and 294 not upgraded.
Need to get 35.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
mysql-apt-config
Install these packages without verification? [y/N] y
Get:1 http://repo.mysql.com/apt/ubuntu/ trusty/mysql-apt-config mysql-apt-config all 0.8.13-1 [35.6 kB]
Fetched 35.6 kB in 0s (229 kB/s)
Preconfiguring packages ...
dpkg-deb: error: archive '/var/cache/apt/archives/mysql-apt-config_0.8.13-1_all.deb' has premature member 'control.tar.xz' before 'contro
l.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/mysql-apt-config_0.8.13-1_all.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/mysql-apt-config_0.8.13-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
并紧接着是:
$ sudo apt-get update
这没有帮助。
我仍然得到了相同的错误。
最后,以下方法有效:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5072E1F5
我猜测(盲目地)可能是pgp.mit.edu改变了他们的结构,或者"MySQL Release Engineering"(运行
apt-key list
)已经将他们的密钥移动到ubuntu密钥服务器或类似的地方(我不知道密钥是如何维护的)。
这个重复帖子上的评论也说了同样的事情。
希望这能为某人节省时间和精力。
--keyserver pgp.mit.edu
。来源:https://bugs.mysql.com/bug.php?id=85029 - Craig van Tonder