软件和更新(software-properties-gtk):’EOFError:编组数据太短’

我无法在14.04上打开软件和更新工具并收到以下错误:

在此处输入图像描述

以下是apt-get update的完整输出 ,它显示了此警告:

 W: GPG error: http://dl.bintray.com Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 99E82A75642AC823 

当我运行sudo software-properties-gtk ,我得到了这个错误回溯 。 它显示了像EOFError: marshal data too short这样的错误EOFError: marshal data too short

我怎样才能解决这个问题?

有两个问题:

  • GPG在http://dl.bintray.com存储库中缺少密钥错误
  • EOFError: marshal data too short当Python3尝试import urllib以启动software-properties-gtk (“软件和更新”设置窗口)时, EOFError: marshal data too short

要解决GPG错误,请按照@ GAD3R的回答或如何修复GPG错误“NO_PUBKEY”的任何答案?

您决定从软件源中删除此存储库,如果您不再需要它也可以。


要解决Python EOFError,我们需要删除一些*.pyc文件。 这些是脚本的编译字节代码,当Python脚本运行以加速将来的启动时,它会动态创建。 它们是错误的,并且由于某种原因不再与原始脚本匹配。 我们可以简单地删除它们,因为它们并不是真正需要的,并且会在下次启动时重新创建。

我们不想要大屠杀,只需要小而有效地删除有缺陷的文件。 因此,我们从software-properties-gtk输出中查看错误回溯,并发现当Python 3.4尝试import urllib.parse时总会发生此错误。 为了避免后续错误,我们只需删除与Python 3.4的urllib模块相关的所有*.pyc文件:

 sudo rm -r /usr/lib/python3.4/urllib/__pycache__ 

键入以下命令:

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 99E82A75642AC823 sudo apt-get update