SystemError: E:The package login needs to be reinstalled, but I can't find an archive for it.

$ sudo dpkg --audit
[sudo] password for maldonado: 
The following packages are in a mess due to serious problems during
installation.  They must be reinstalled for them (and any packages
that depend on them) to function properly:
 login                system login tools

The following packages are missing the list control file in the
database, they need to be reinstalled:
 xserver-xorg-input-vmmouse X.Org X server -- VMMouse input driver to use with 
 libexempi3:i386      library to parse XMP metadata (Library)
 ubuntu-release-upgrader-gtk manage release upgrades
 libgtkspell0         a spell-checking addon for GTK's TextView widget
 python-pkg-resources Package Discovery and Resource Access using pkg_resources...

 libitm1:i386         GNU Transactional Memory Library
 policykit-1          framework for managing administrative policies and privil
 software-properties-gtk manage the repositories that you install software from
 gnome-control-center-shared-data configuration applets for GNOME - shared data
 upower               abstraction for power management
 libnfnetlink0:i386   Netfilter netlink library
 unity-scope-gourmet  Gourmet Recipe Manager scope for Unity
 pptp-linux           Point-to-Point Tunneling Protocol (PPTP) Client
 libcupsimage2:i386   Common UNIX Printing System(tm) - Raster image library
 checkbox-qt          QT4 interface for checkbox
 p7zip                7z file archiver with high compression ratio
 growisofs            DVD+-RW/R recorder
 usbmuxd              USB multiplexor daemon for iPhone and iPod Touch devices
 libjson-glib-1.0-common GLib JSON manipulation library (common files)
 libwrap0:i386        Wietse Venema's TCP wrappers library
 cups                 Common UNIX Printing System(tm) - PPD/driver support, web
 activity-log-manager blacklist configuration user interface for Zeitgeist
 libkrb5-3:i386       MIT Kerberos runtime libraries
 pipelight-multi      allows usage of Windows NPAPI plugins through Wine
 lsof                 Utility to list open files
 pulseaudio-module-bluetooth Bluetooth module for PulseAudio sound server
 libpython2.7-minimal:i386 Minimal subset of the Python language (version 2.7)
 liblockfile1:i386    NFS-safe locking library
 libxau6:i386         X11 authorisation library
 libssh2-1:i386       SSH2 client-side library
 linux-image-3.13.0-35-generic Linux kernel image for version 3.13.0 on 32 bit 
 libio-string-perl    Emulate IO::File interface for in-core strings
 qtdeclarative5-qtfeedback-plugin:i386 Qt Feedback module - QML plugin
 gnome-power-manager  power management tool for the GNOME desktop

The following packages are missing the md5sums control file in the
database, they need to be reinstalled:
 google-earth-stable  Explore, search and discover the planet
  • sudo apt-get install --reinstall package_name is how you reinstall (replace the package_name by the name of the package you want to reinstall).
    – user692175
    Aug 14 '17 at 0:25
  • yeah, I've done that before but it reads the same error. Thanks anyway @MichaelBay
    – emlvz88
    Aug 14 '17 at 0:40
  • What Ubuntu version are you using? Aug 14 '17 at 0:41
  • I'm running 14.04, I'm trying to upgrade to 16.04, but I keep getting the same error. @steeldriver
    – emlvz88
    Aug 14 '17 at 0:42
  • Please either include your /etc/apt/sources.list or the complete output of sudo apt-get update so that we can see what repositories are being used Aug 14 '17 at 1:27

Have you been using sudo recently (that you have to reinstall login)? Be more careful.

Here's how I got MY system (YMMV) to tell me how to do it:

w3@aardvark:~(0)$ type -p login
w3@aardvark:~(0)$ dpkg -S $(!!)
dpkg -S $(type -p login)
login: /bin/login
w3@aardvark:~(0)$ dpkg -l $(!! |cut -d: -f1)
dpkg -l $(dpkg -S $(type -p login) |cut -d: -f1)
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                       Version                    Architecture               Description
ii  login                                      1:4.2-3.1ubuntu5.3         amd64                      system login tools
w3@aardvark:~(0)$ sudo apt-get install --reinstall --dry-run $(dpkg -S $(type -p login) |cut -d: -f1)
[sudo] password for w3: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdvbpsi10 libffmpegthumbnailer4v5 libllvm3.8 libllvm3.8:i386 libproxy-tools libupnp6 libva-drm1 linux-headers-4.4.0-83 linux-headers-4.4.0-83-generic linux-headers-4.4.0-87
  linux-headers-4.4.0-87-generic linux-image-4.4.0-83-generic linux-image-4.4.0-87-generic linux-image-extra-4.4.0-83-generic linux-image-extra-4.4.0-87-generic linux-tools-4.4.0-83
  linux-tools-4.4.0-83-generic linux-tools-4.4.0-87 linux-tools-4.4.0-87-generic pmount
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
Inst login [1:4.2-3.1ubuntu5.3] (1:4.2-3.1ubuntu5.3 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
Conf login (1:4.2-3.1ubuntu5.3 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
  • yes I've been using sudo to update and upgrade. I haven't been able to install because I get the login package error. And your solution didn't work for me :( @waltinator
    – emlvz88
    Aug 14 '17 at 3:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.