升级到 12.10 后 Apt Autoremove 失败

升级到 12.10 后 Apt Autoremove 失败

升级到 12.10 后,apt 命令失败。我认为 emacsen-common 是导致问题的原因。我该怎么办?

user@ubuntu:[~]$ sudo apt-get autoremove 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  emacsen-common
The following packages will be REMOVED
  compiz-plugins-main g++-4.6 gcc-4.6-base:i386 gcj-4.6-base gcj-4.6-jre-lib gir1.2-folks-0.6
  gir1.2-gee-1.0 jockey-common libbabl-0.0-0 libcelt0-0 libcommons-el-java libelf1:i386
  libgcj12 libgegl-0.0-0 libgomp1:i386 libgsoap1 libjasper-java libjetty-java libllvm3.0:i386
  libservlet2.4-java libslf4j-java libstdc++6-4.6-dev libtiff4:i386 libx264-120 libxfce4util4
  nvidia-common packagekit-backend-aptcc python-central python-gmenu
  syslinux-themes-debian-squeeze
The following packages will be upgraded:
  emacsen-common
1 upgraded, 0 newly installed, 30 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/17.3 kB of archives.
After this operation, 125 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 482449 files and directories currently installed.)
Preparing to replace emacsen-common 1.4.22ubuntu1 (using .../emacsen-common_2.0.3_all.deb) ...
/var/lib/dpkg/info/emacsen-common.prerm: 10: /var/lib/dpkg/info/emacsen-common.prerm: /usr/lib/emacsen-common/emacs-package-remove: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 5: /var/lib/dpkg/tmp.ci/prerm: /usr/lib/emacsen-common/emacs-package-remove: not found
dpkg: error processing /var/cache/apt/archives/emacsen-common_2.0.3_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/emacsen-common.postinst: 40: /var/lib/dpkg/info/emacsen-common.postinst: /usr/lib/emacsen-common/emacs-package-install: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/emacsen-common_2.0.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

我不确定这是否是解决这个问题最明智的方法,但这应该有效(以 root 身份运行以下命令):

rm -rf /var/lib/dpkg/info/emacsen-*
rm -rf /var/cache/apt/archives/emacsen-*
apt-get upgrade
apt-get autoremove

相关内容