1

I tried to upgrade from 16.04 to 18.04, but if failed with the message "Aborting" and "restoring previous state". I followed up on several similar reports here, without success, and finally decided to plan a clean install of a newer release in the year 2022. But now my 16.04 system fails when I try to update software.It had no such problem before that.

How to get back to previous state?

At this time, "sudo apt-get update" gives these messages:

Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease                                                                   
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                        
Get:4 http://packages.microsoft.com/repos/vscode stable InRelease [3,181 B]                                                         
Hit:5 http://ppa.launchpad.net/flacon/ppa/ubuntu xenial InRelease                                                                   
Hit:6 http://dl.google.com/linux/chrome/deb stable Release                                                                          
Hit:7 https://download.sublimetext.com apt/stable/ InRelease                                                                        
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial InRelease                                                         
Hit:9 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                 
Hit:10 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease   
Hit:11 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease
Hit:12 https://repo.skype.com/deb stable InRelease                            
Hit:13 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease      
Get:14 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages [93.1 kB]
Get:15 https://deb.nodesource.com/node_8.x xenial InRelease [4,646 B]
Fetched 101 kB in 1s (58.4 kB/s)                     
Reading package lists... Done
W: Target Packages (partner/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11 (partner/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11 (partner/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list.d/xenial-partner.list:4

And, "sudo apt-get upgrade" fails as follows:

~> sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libarchive13 openssh-client ssh-askpass-gnome
3 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
Need to get 0 B/866 kB of archives.
After this operation, 8,192 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libc-bin (2.23-0ubuntu10) ...
Bus error (core dumped)
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/usr/lib/x86_64-linux-gnu/libfakeroot:
    libfakeroot-0.so -> libfakeroot-tcp.so
/lib/i386-linux-gnu:
Bus error (core dumped)
dpkg: error processing package libc-bin (--configure):
subprocess installed post-installation script returned error exit status 135
Errors were encountered while processing:
 libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

Requested current partners list file:

$ cat xenial-partner.list
# channel for the xenial (16.04) partner channel
#:description:This channel contains the partner software for xenial
deb archive.canonical.com/ubuntu xenial partner

The system cannot download libc, due to a permissions issue:

OptiPlex-755:~$ sudo apt-get download libc-bin 
Get:1 us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-bin amd64 2.23-0ubuntu10 [641 kB] 
Fetched 641 kB in 0s (1,643 kB/s) 
W: Can't drop privileges for downloading as file '/home/rich/libc-bin_2.23-0ubuntu10_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) 
OptiPlex-755:~$ 
N0rbert
  • 99,918
ElHombre55
  • 195
  • 1
  • 12
  • 1
    Please add contents of /etc/apt/sources.list.d/xenial-partner.list to the question. For me it seems that repositories are still xenial (not bionic). – N0rbert Feb 08 '19 at 17:19
  • Will do. To clarify, the upgrade to 18.04 failed and rolled me back to 16.04. This question is about fixing 16.04, not fixing the upgrade - I gave up on that. – ElHombre55 Feb 08 '19 at 17:30
  • 1
    Before upgrade you need to fix problems in current release. So consider to remove problematic sources.list with sudo rm /etc/apt/sources.list.d/xenial-partner.list then retry sudo apt update followed by sudo apt dist-upgrade. And report output. – N0rbert Feb 08 '19 at 17:33
  • the current partners file: cat /etc/apt/sources.list.d/xenial-partner.list # channel for the xenial (16.04) partner channel # #:description:This channel contains the partner software for xenial deb http://archive.canonical.com/ubuntu xenial partner – ElHombre55 Feb 08 '19 at 17:35
  • I got rid of sources.list.d , now "apt update" has no complaints. It still finds that "3 packages can be upgraded. " TY. But "apt upgrade" still fails the same way. (At this point, I have not yet fixed libc as in your answer below, so i guess this is expected.) – ElHombre55 Feb 08 '19 at 17:48

1 Answers1

1

I see the following moments:

  1. You have warning messages about duplicate entries - remove them by removing the partners' repository file and updating APT again:

    sudo rm /etc/apt/sources.list.d/xenial-partner.list
    sudo apt-get update
    
  2. Your libc is somewhere broken, we need to fix it before upgrade

    apt-get download libc-bin
    sudo dpkg -x libc-bin*.deb /
    sudo apt-get install --reinstall ./libc-bin*.deb
    
  3. Upgrade all packages of current release to latest versions

    sudo apt dist-upgrade
    
  4. Upgrade the system to 18.04 LTS

    sudo do-release-upgrade
    
N0rbert
  • 99,918
  • The system cannot download libc, due to a permissions issue: (btw, how to format a comment here?) OptiPlex-755:~$ sudo apt-get download libc-bin
    Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-bin amd64 2.23-0ubuntu10 [641 kB]
    Fetched 641 kB in 0s (1,643 kB/s)
    W: Can't drop privileges for downloading as file '/home/rich/libc-bin_2.23-0ubuntu10_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
    OptiPlex-755:~$
    – ElHombre55 Feb 08 '19 at 17:54
  • 1
    Checked my method on clean 16.04 LTS - it is safe. – N0rbert Feb 08 '19 at 18:02
  • Since my original problem now has been narrowed down to a problem with libc, I intend to close this question and ask a more specific question about updating libc. @N0rbert TYVM for the help and progress so far. – ElHombre55 Feb 08 '19 at 23:07
  • Well, the problem with my first attempt was that i used "sudo apt-get..." contrary to directions. On the second attempt: "apt-get download..." worked fine with no reponse, "sudo dpkg ..." also no problem or response. But the third step errors: 'sudo apt-get install --reinstall libc-bin Reading package lists... ... Done 0 to upgrade, ... and 3 not to upgrade. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for libc-bin:amd64 ' – ElHombre55 Feb 08 '19 at 23:20
  • To complete this step try sudo apt-get install --reinstall ./libc-bin*.deb in folder with this deb-file. – N0rbert Feb 09 '19 at 08:30