2

I cannot open Software & Updates tool on 14.04 and get the following error:

enter image description here

Here is the full output of apt-get update, it shows this warning:

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

When I run sudo software-properties-gtk, I get this error traceback. It shows errors like EOFError: marshal data too short.

How can I fix this?

Byte Commander
  • 105,631
  • 46
  • 284
  • 425
yildizabdullah
  • 297
  • 3
  • 6
  • 13
  • 1
    Give the terminal output of `sudo apt-get update` – Gayan Weerakutti Feb 18 '16 at 10:41
  • Here is what sudo apt-get update gives: http://pastebin.com/8a9AXujX – yildizabdullah Feb 18 '16 at 10:48
  • 1
    Possible duplicate of [How do I fix the GPG error "NO\_PUBKEY"?](http://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey) – Byte Commander Feb 18 '16 at 10:57
  • @ByteCommander No, the solutions at the post didn't work. – yildizabdullah Feb 18 '16 at 11:08
  • 1
    @yildizabdullah [Removing](http://ubuntuguide.net/how-to-remove-ppa-include-installed-packages-in-ubuntu) the bintray ppa would do. – Gayan Weerakutti Feb 18 '16 at 11:27
  • @reversiblean deleted /etc/apt/sources.list.d/sbt.list file which includes the address of the repo. still getting the same error after apt-get update and restart. – yildizabdullah Feb 18 '16 at 11:42
  • @ByteCommander I've noticed that I cannot run `sudo software-properties-gtk` http://pastebin.com/NkRynvmZ – yildizabdullah Feb 18 '16 at 12:19
  • 2
    You are not supposed to run `software-properties-gtk` with `sudo`! Launch it as your normal user account and it will ask for privilege elevation when needed itself. - And please try if the problem gets solved after you run `sudo rm -rf /var/lib/apt/lists/* ; sudo apt-get update`. Did that help? – Byte Commander Feb 18 '16 at 14:41
  • @ByteCommander No, it didn't work. Running `software-properties-gtk` without `sudo` gives similar errors I got before. – yildizabdullah Feb 18 '16 at 15:53
  • @yildizabdullah Please run `sudo updatedb ; locate '*.pyc' ; locate '*.pyo'` and upload the output to another pastebin. – Byte Commander Feb 18 '16 at 18:31
  • And which Python 2 (`python --version`) and Python 3 (`python3 --version`) version do you use, what is used to run the Software&Updates tool (`head -n 1 $(which software-properties-gtk)`)? Please give the output of all of those commands. – Byte Commander Feb 18 '16 at 18:54
  • @ByteCommander Here is what `locate '*.pyc'` outputs: http://pastebin.com/iSR1a6mv (`locate '*.pyo'` didn't output anything) – yildizabdullah Feb 19 '16 at 06:50
  • @ByteCommander `python --version` outputs `Python 2.7.6` and `python3 --version` outputs `Python 3.4.3`. `head -n 1 $(which software-properties-gtk)` outputs `#! /usr/bin/python3` – yildizabdullah Feb 19 '16 at 06:53
  • @yildizabdullah Please run `sudo rm -r /usr/lib/python3.4/urllib/__pycache__` and then try to launch `software-properties-gtk` (without `sudo`!) again. – Byte Commander Feb 19 '16 at 07:19
  • @ByteCommander OK. It worked. Thanks for your help. – yildizabdullah Feb 19 '16 at 07:25
  • @yildizabdullah I converted my comments into an answer. Please accept it by clicking the grey tick symbol on its left side to mark your question as solved. Thanks! – Byte Commander Feb 19 '16 at 07:40

2 Answers2

2

There are two problems:

  • GPG missing key error on the http://dl.bintray.com repository
  • EOFError: marshal data too short when Python3 tries to import urllib to launch software-properties-gtk (the "Software & Updates" settings window)

To resolve the GPG error, please follow @GAD3R's answer or any answer to How do I fix the GPG error "NO_PUBKEY"?

You decided to remove this repository from your software sources, which is also ok if you don't need it any more.


To resolve the Python EOFError, we need to eliminate some *.pyc files. Those are compiled byte code of a script, which gets dynamically created when a Python script runs to speed up future launches. They are faulty and don't match the original script any more for whatever reason. We can simply delete them as they are not really needed and will be recreated on the next launch.

We don't want a massacre but a small and effective removal of the faulty files only. Therefore we look at the error traceback from the software-properties-gtk output and find out that this error always happens when Python 3.4 tries to import urllib.parse. To avoid follow-up errors we simply remove all *.pyc files related to Python 3.4's urllib module:

sudo rm -r /usr/lib/python3.4/urllib/__pycache__
Byte Commander
  • 105,631
  • 46
  • 284
  • 425
0

Type the following command :

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 99E82A75642AC823
sudo apt-get update
GAD3R
  • 2,821
  • 1
  • 18
  • 30
  • I eliminated this error by first removing the related repo address at `/etc/apt/sources.list.d/sbt.list` and then running `sudo apt-get update`. – yildizabdullah Feb 18 '16 at 15:56