0

I tried to reinstall pip but there seems to be a problem with the location of some files related to the update manager.

sudo apt-get install python-pip
[sudo] password for benoit: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package update-manager needs to be reinstalled, but I can't find an archive for it.

And then I get the following from an attempt to update the package update manager.

$ sudo apt-get update
    Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
    Get:2 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease [17,5 kB]            
    Hit:3 http://ca.archive.ubuntu.com/ubuntu xenial InRelease                                          
    Hit:4 http://ca.archive.ubuntu.com/ubuntu xenial-security InRelease                                 
    Hit:5 http://ppa.launchpad.net/teejee2008/ppa/ubuntu xenial InRelease                               
    Ign:6 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease                           
    Hit:7 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release  
    Ign:8 http://dl.google.com/linux/chrome/deb stable InRelease            
    Ign:9 http://dl.google.com/linux/earth/deb stable InRelease
    Ign:10 http://dl.google.com/linux/talkplugin/deb stable InRelease
    Ign:2 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease
    Hit:11 http://dl.google.com/linux/chrome/deb stable Release
    Hit:12 http://dl.google.com/linux/earth/deb stable Release
    Hit:15 http://dl.google.com/linux/talkplugin/deb stable Release
    Fetched 17,5 kB in 0s (29,9 kB/s)                 
    Reading package lists... Done
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: GPG error: http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3BDAAC08614C4B38
    W: The repository 'http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease' is not signed.
    N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3
    W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:24 and /etc/apt/sources.list.d/google-chrome.list:3

I then tried to regenerate the source.list file, which didn't seem to solve the problem. Here's my source.list file as it is now.

source.list

I don't quite see where I should investigate next. Could someone help?

  • The things you are showing us all appear to be warnings - what are the actual errors? – steeldriver Jun 21 '17 at 12:10
  • I thought this could be an indication of something problematic. I edited my post to provide more background to my issue. In short, I need to reinstall my update manager but I don't quite see where to investigate. – BenoitA Jun 21 '17 at 16:15
  • 1
    Well I suggest you clear the errors (by removing repositories from your main /etc/apt/sources.list file that are also specified in files inside the /etc/apt/sources.list.d/ directory - the W: messages tell you which those are) and see if it makes any difference. – steeldriver Jun 21 '17 at 16:35
  • https://askubuntu.com/questions/147178/ethe-package-needs-to-be-reinstalled-but-i-cant-find-an-archive-for-it – luv.preet Jun 21 '17 at 19:14
  • @steeldriver - I have. I regenerate the source.list main file and have edit the repository you mentioned. This is what I get as output: $ sudo apt-get update Get:1 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease [17,5 kB] Hit:2 http://ca.archive.ubuntu.com/ubuntu xenial InRelease Hit:3 http://archive.canonical.com/ubuntu xenial InRelease Ign:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease Hit:5 http://ppa.launchpad.net/teejee2008/ppa/ubuntu xenial InRelease – BenoitA Jun 21 '17 at 19:59
  • Hit:6 http://ca.archive.ubuntu.com/ubuntu xenial-security InRelease Hit:7 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release Ign:8 http://dl.google.com/linux/chrome/deb stable InRelease Ign:1 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease Ign:9 http://dl.google.com/linux/talkplugin/deb stable InRelease Hit:10 http://dl.google.com/linux/chrome/deb stable Release Hit:11 http://dl.google.com/linux/talkplugin/deb stable Release Fetched 17,5 kB in 0s (24,0 kB/s) Reading package lists... Done – BenoitA Jun 21 '17 at 20:01
  • W: GPG error: http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3BDAAC08614C4B38 W: The repository 'http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. – BenoitA Jun 21 '17 at 20:01
  • @luv.preet - Thanks for pointing out. I had already read this tread. I tried uninstalling with sudo apt-get --purge remove update-manager and other variants, but I get the exact same output, that archive files are missing. – BenoitA Jun 21 '17 at 20:04

1 Answers1

0

Try installing the update-manager package manually.

  1. Download the package using on of the links from here. You can choose any one, but it would be preferable to use the one for your country.

  2. Install by running dpkg -i /file/you/downloaded

If there are any errors, could you please post them in a comment.

  • Thanks for the quick reply. There still seems to be some corrupted files elsewhere. I also very recently updated python and am wondering if this is where I might have messed up. Here is what I get out of the install you suggested. I seem to have to paste this over a few comments, as their are limited in size. – BenoitA Jun 21 '17 at 19:38
  • $ sudo dpkg -i ./update-manager_16.04.6_all.deb (Reading database ... 420703 files and directories currently installed.) Preparing to unpack .../update-manager_16.04.6_all.deb ... File "/usr/bin/py3clean", line 4 SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details dpkg: warning: subprocess old pre-removal script returned error exit status 1 dpkg: trying script from the new package instead ... File "/usr/bin/py3clean", line 4 – BenoitA Jun 21 '17 at 19:39
  • SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details dpkg: error processing archive ./update-manager_16.04.6_all.deb (--install): subprocess new pre-removal script returned error exit status 1 File "/usr/bin/py3compile", line 4 SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3compile on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details – BenoitA Jun 21 '17 at 19:41
  • dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: ./update-manager_16.04.6_all.deb – BenoitA Jun 21 '17 at 19:41
  • Could you Post the first 4 lines of /usr/bin/py3clean. –  Jun 22 '17 at 05:47
  • Just run cat /usr/bin/py3clean | head -4 –  Jun 22 '17 at 05:48
  • In case you are wondering, that code reads the file, and outputs the first 4 lines –  Jun 22 '17 at 05:49
  • nothing comes out even if I waited very long. It's as if the process is stuck in a loop. I have to close my terminal. – BenoitA Jun 22 '17 at 09:26
  • What about opening the file in a text editor –  Jun 22 '17 at 17:16