如何重新安装“登录”包?

如何重新安装“登录”包?

SystemError: E:需要重新安装包登录,但我找不到它的存档。

$ 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...





 ...file
 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

答案1

您最近有没有使用过sudo(需要重新安装login)?要小心。

以下是我得到的方法我的系统(YMMV)告诉我如何做:

w3@aardvark:~(0)$ type -p login
/bin/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)
Desired=Unknown/Install/Remove/Purge/Hold
| 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])

相关内容