如何在 Synaptic Manager 中恢复中断的安装?

如何在 Synaptic Manager 中恢复中断的安装?

我使用 Lubuntu 12.04,并尝试在 Synaptic 中安装 lubuntu-restricted-extras。

它似乎卡在了某一点:当被要求接受一些用于字体的 Microsoft EULA(我猜)时,我按下了 Enter 键,但我觉得我什么也做不了,只能尝试关闭 synaptic,但我做不到,最后只好注销。

也许我不该这么做,但我却这么做了。

登录并重新启动后,不会启动任何安装,就好像 Synaptic 仍在工作一样。

问题似乎在于 lubuntu-restricted-extras 的安装不完整。

该怎么办呢?

当我输入

 sudo dpkg --configure -a

我得到:

dpkg: error: dpkg status database is locked by another process

我发现这里我可以打字

sudo rm /var/lib/dpkg/lock

 sudo dpkg --configure -a

然后更新(工作正常)并升级,此时我得到

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic
The following packages will be upgraded:
  accountsservice apparmor apport apport-gtk apt apt-transport-https apt-utils
  aptdaemon aptdaemon-data audacious-plugins audacious-plugins-data base-files
  bind9-host blueman cron cups cups-client cups-common cups-driver-gutenprint
  cups-filters cups-ppdc dconf-gsettings-backend dconf-service
  desktop-file-utils dmsetup dnsutils evince evince-common firefox-locale-en
  fonts-liberation foomatic-filters ghostscript ghostscript-cups ghostscript-x
  gir1.2-gtk-3.0 gir1.2-pango-1.0 glib-networking glib-networking-common
  glib-networking-services gnome-icon-theme gnome-icon-theme-full grub-common
  grub-pc grub-pc-bin grub2-common gstreamer0.10-plugins-base hdparm
  initscripts isc-dhcp-client isc-dhcp-common jockey-common jockey-gtk
  krb5-locales libaccountsservice0 libapt-inst1.4 libapt-pkg4.12 libasound2
  libbind9-80 libcairo-gobject2 libcairo2 libcups2 libcupscgi1 libcupsfilters1
  libcupsimage2 libcupsmime1 libcupsppdc1 libdbusmenu-glib4 libdbusmenu-gtk3-4
  libdconf0 libdevmapper-event1.02.1 libdevmapper1.02.1 libdns81 libevince3-3
  libexif12 libexpat1 libfm-data libfm-gtk-data libfm-gtk1 libfm1 libgail-3-0
  libgcrypt11 libgl1-mesa-dri libgl1-mesa-glx libglade2-0 libglapi-mesa
  libglib2.0-0 libglib2.0-bin libglib2.0-data libglu1-mesa libgnutls26
  libgphoto2-2 libgphoto2-port0 libgrip0 libgs9 libgs9-common libgssapi-krb5-2
  libgstreamer-plugins-base0.10-0 libgtk-3-0 libgtk-3-bin libgtk-3-common
  libgudev-1.0-0 libgutenprint2 libisc83 libisccc80 libisccfg82
  libjavascriptcoregtk-1.0-0 libjpeg-turbo8 libk5crypto3 libkrb5-3
  libkrb5support0 liblaunchpad-integration-3.0-1
  liblaunchpad-integration-common liblaunchpad-integration1 libldap-2.4-2
  liblightdm-gobject-1-0 liblvm2app2.2 liblwres80 libmtp-common libmtp9
  libnautilus-extension1a libnm-glib-vpn1 libnm-glib4 libnm-util2
  libpango1.0-0 libperl5.14 libpolkit-agent-1-0 libpolkit-backend-1-0
  libpolkit-gobject-1-0 libpulse-mainloop-glib0 libpulse0 libpurple0
  libpython2.7 libsasl2-2 libsasl2-modules libsmbclient libsqlite3-0
  libssl1.0.0 libtasn1-3 libtiff4 libudev0 libutouch-geis1 libv4l-0
  libv4lconvert0 libwbclient0 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common
  libxatracker1 libxkbfile1 libxml2 libxslt1.1 lightdm lxkeymap nautilus-data
  network-manager ntp ntpdate openssl perl perl-base perl-modules pidgin
  pidgin-data policykit-1 printer-driver-gutenprint psmisc python-apport
  python-aptdaemon python-aptdaemon.gtk3widgets python-cupshelpers python-gi
  python-gobject python-libxml2 python-problem-report
  python-software-properties python2.7 python2.7-minimal resolvconf
  shared-mime-info simple-scan software-properties-common
  software-properties-gtk ssl-cert sudo system-config-printer-common
  system-config-printer-gnome sysv-rc sysvinit-utils ttf-mscorefonts-installer
  udev udisks update-manager update-manager-core update-notifier
  update-notifier-common upstart vim-common vim-tiny xkb-data xserver-common
  xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics
  xserver-xorg-input-vmmouse xserver-xorg-video-intel
  xserver-xorg-video-vmware
205 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

Synaptic 可以打开,以前没有出现过这种情况。但是当我尝试在 Synaptic 中安装 lubuntu-restricted-extras 时,出现了以下情况:

E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable) E: Unable to lock the download directory

答案1

问题在于这个还有一些我现在似乎无法在这里找到的内容。当我找到它们时,我会重新编辑。

这是一个错误看起来,解决方案是输入

sudo rm -rf /var/cache/debconf/*
sudo apt-get install -f

这似乎可以恢复中断的安装。我遇到了一些错误,但之后我就可以进行安装了。

完全升级涉及一些错误,因此只能进行部分升级,但中断的安装似乎已在这次升级期间得到解决(包括再次向我呈现的 Microsoft EULA - 请参阅问题的评论),之后重新启动,一切看起来都很好。

相关内容