[Bug 1843476] Re: running `apt download atop` ; `sudo dpkg -x atop_2.4.0-3_amd64.deb /` kills the system

Norbert 1843476 at bugs.launchpad.net
Tue Sep 10 19:25:37 UTC 2019


It is a bit unbelievable.

After extracting of atop package the `/lib` folder contains only one folder `/lib/systemd`.
But before the accident it was a symlink to `/usr/lib`.

So you have a serious bug in `dpkg` - it should distinguish between
ordinary objects and symlinks.

Problem is solvable by the following actions

   sudo chroot /media/user/problematic-disk/ busybox sh
   rm -rf /lib
   ln -s usr/lib lib

then boot the system and reinstall the package

   apt install atop --reinstall

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/1843476

Title:
  running `apt download atop` ; `sudo dpkg -x atop_2.4.0-3_amd64.deb /`
  kills the system

Status in dpkg package in Ubuntu:
  New

Bug description:
  Steps to reproduce:
  1. Have Ubuntu 19.10 installed
  2. Ensure that all dependencies for needed packages are satisfied:

  $ apt install -s atop
  NOTE: This is only a simulation!
        apt needs root privileges for real execution.
        Keep also in mind that locking is deactivated,
        so don't depend on the relevance to the real current situation!
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following NEW packages will be installed:
    atop
  0 upgraded, 1 newly installed, 0 to remove and 199 not upgraded.
  Inst atop (2.4.0-3 Ubuntu:19.10/eoan [amd64])
  Conf atop (2.4.0-3 Ubuntu:19.10/eoan [amd64])

  3. Download the package with `apt download atop`
  4. Extract the package by hand with `sudo dpkg -x atop_2.4.0-3_amd64.deb /` (this is needed if system is broken and it is used in practice; atop is just an example)

  Expected results:
  package is extracted normally

  Actual results:
  package is extracted, but system is killed - unable to use `sudo` and many other commands -

    $ sudo
    bash: /usr/bin/sudo: No such file or directory

    $ bash
    bash: /usr/bin/bash: No such file or directory

    $ dash
    bash: /usr/bin/dash: No such file or directory

    $ systemctl
    bash: /usr/bin/systemctl: No such file or directory

    $ journalctl
    bash: /usr/bin/journalctl: No such file or directory

    $ ip a
    bash: /usr/sbin/ip: No such file or directory

    $ ldd
    bash: /usr/bin/ldd: /bin/bash: bad interpreter: No such file or directory

    $ mc
    bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory

    $ python
    bash: /usr/bin/python: No such file or directory

    $ apt
    bash: /usr/bin/apt: No such file or directory

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: dpkg 1.19.7ubuntu1
  ProcVersionSignature: Ubuntu 5.2.0-15.16-generic 5.2.9
  Uname: Linux 5.2.0-15-generic x86_64
  ApportVersion: 2.20.11-0ubuntu7
  Architecture: amd64
  CurrentDesktop: MATE
  Date: Tue Sep 10 21:25:58 2019
  InstallationDate: Installed on 2019-09-06 (4 days ago)
  InstallationMedia: Ubuntu-MATE 19.10 "Eoan Ermine" - Alpha amd64 (20190906)
  SourcePackage: dpkg
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1843476/+subscriptions



More information about the foundations-bugs mailing list