这一切都是在安装 xemacs21 后开始的。以下是一些可能需要进行故障排除的输出。如果我需要添加更多内容,请告诉我。编辑(印度时间 15:00)(删除 postinit 脚本后,apt 开始完美运行,但 dpkg 仍然给出相同的错误
尝试后
sudo dpkg
给予
dpkg: error: need an action option
Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
尝试后
sudo apt-get -f install
给予
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up xemacs21-mule (21.4.22-14ubuntu1) ...
/var/lib/dpkg/info/xemacs21-mule.postinst: 38: /var/lib/dpkg/info/xemacs21-mule.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error processing package xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of xemacs21:
xemacs21 depends on xemacs21-mule (>= 21.4.22-14ubuntu1) | xemacs21-mule-canna-wnn (>= 21.4.22-14ubuntu1) | xemacs21-nomule (>= 21.4.22-14ubuntu1); however:
Package xemacs21-mule is not configured yet.
Package xemacs21-mule-canna-wnn is not installed.
Package xemacs21-nomule is not installed.
dpkg: error processing package xemacs21 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
xemacs21-mule
xemacs21
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试后
sudo apt autoremove -f
给予
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up xemacs21-mule (21.4.22-14ubuntu1) ...
/var/lib/dpkg/info/xemacs21-mule.postinst: 38: /var/lib/dpkg/info/xemacs21-mule.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error processing package xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
xemacs21-mule
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试后
sudo apt-get --purge remove xemacs21
给予
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
xemacs21*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 26.6 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 260044 files and directories currently installed.)
Removing xemacs21 (21.4.22-14ubuntu1) ...
Setting up xemacs21-mule (21.4.22-14ubuntu1) ...
/var/lib/dpkg/info/xemacs21-mule.postinst: 38: /var/lib/dpkg/info/xemacs21-mule.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error processing package xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
xemacs21-mule
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试后
sudo apt-get install dpkg
给予
Reading package lists... Done
Building dependency tree
Reading state information... Done
dpkg is already the newest version (1.18.4ubuntu1.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up xemacs21-mule (21.4.22-14ubuntu1) ...
/var/lib/dpkg/info/xemacs21-mule.postinst: 38: /var/lib/dpkg/info/xemacs21-mule.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error processing package xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of xemacs21:
xemacs21 depends on xemacs21-mule (>= 21.4.22-14ubuntu1) | xemacs21-mule-canna-wnn (>= 21.4.22-14ubuntu1) | xemacs21-nomule (>= 21.4.22-14ubuntu1); however:
Package xemacs21-mule is not configured yet.
Package xemacs21-mule-canna-wnn is not installed.
Package xemacs21-nomule is not installed.
dpkg: error processing package xemacs21 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
xemacs21-mule
xemacs21
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试后
sudo dpkg --configure -a
给予
Setting up xemacs21-mule (21.4.22-14ubuntu1) ...
/var/lib/dpkg/info/xemacs21-mule.postinst: 38: /var/lib/dpkg/info/xemacs21-mule.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error processing package xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of xemacs21:
xemacs21 depends on xemacs21-mule (>= 21.4.22-14ubuntu1) | xemacs21-mule-canna-wnn (>= 21.4.22-14ubuntu1) | xemacs21-nomule (>= 21.4.22-14ubuntu1); however:
Package xemacs21-mule is not configured yet.
Package xemacs21-mule-canna-wnn is not installed.
Package xemacs21-nomule is not installed.
dpkg: error processing package xemacs21 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
xemacs21-mule
xemacs21
尝试后
sudo apt-get update
给予
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:3 https://repo.skype.com/deb stable InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Hit:7 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:8 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:9 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists... Done
尝试后
~$ sudo apt upgrade
给予
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up xemacs21-mule (21.4.22-14ubuntu1) ...
/var/lib/dpkg/info/xemacs21-mule.postinst: 38: /var/lib/dpkg/info/xemacs21-mule.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error processing package xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of xemacs21:
xemacs21 depends on xemacs21-mule (>= 21.4.22-14ubuntu1) | xemacs21-mule-canna-wnn (>= 21.4.22-14ubuntu1) | xemacs21-nomule (>= 21.4.22-14ubuntu1); however:
Package xemacs21-mule is not configured yet.
Package xemacs21-mule-canna-wnn is not installed.
Package xemacs21-nomule is not installed.
dpkg: error processing package xemacs21 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
xemacs21-mule
xemacs21
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试后
sudo apt-get purge --remove xemacs21*
[sudo] nipun 的密码:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'xemacs21-mule-canna-wnn' for glob 'xemacs21*'
Note, selecting 'xemacs21-mule' for glob 'xemacs21*'
Note, selecting 'xemacs21' for glob 'xemacs21*'
Note, selecting 'xemacs21-supportel' for glob 'xemacs21*'
Note, selecting 'xemacs21-basesupport-el' for glob 'xemacs21*'
Note, selecting 'xemacs21-bin' for glob 'xemacs21*'
Note, selecting 'xemacs21-mulesupport' for glob 'xemacs21*'
Note, selecting 'xemacs21-support' for glob 'xemacs21*'
Note, selecting 'xemacs21-mulesupport-el' for glob 'xemacs21*'
Note, selecting 'xemacs21-gnome-nomule' for glob 'xemacs21*'
Note, selecting 'xemacs21-gnome-mule' for glob 'xemacs21*'
Note, selecting 'xemacs21-nomule' for glob 'xemacs21*'
Note, selecting 'xemacs21-basesupport' for glob 'xemacs21*'
Note, selecting 'xemacs21-gnome-mule-canna-wnn' for glob 'xemacs21*'
Package 'xemacs21-gnome-mule' is not installed, so not removed
Package 'xemacs21-gnome-mule-canna-wnn' is not installed, so not removed
Package 'xemacs21-gnome-nomule' is not installed, so not removed
Package 'xemacs21' is not installed, so not removed
Package 'xemacs21-basesupport-el' is not installed, so not removed
Package 'xemacs21-mule-canna-wnn' is not installed, so not removed
Package 'xemacs21-mulesupport-el' is not installed, so not removed
Package 'xemacs21-nomule' is not installed, so not removed
Package 'xemacs21-supportel' is not installed, so not removed
The following package was automatically installed and is no longer required:
libcompfaceg1
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
xemacs21-basesupport* xemacs21-bin* xemacs21-mule* xemacs21-mulesupport*
xemacs21-support*
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 98.3 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 260040 files and directories currently installed.)
Removing xemacs21-mule (21.4.22-14ubuntu1) ...
/var/lib/dpkg/info/xemacs21-mule.prerm: 19: /var/lib/dpkg/info/xemacs21-mule.prerm: /usr/lib/emacsen-common/emacs-remove: not found
dpkg: error processing package xemacs21-mule (--purge):
subprocess installed pre-removal script returned error exit status 127
update-alternatives: using /usr/bin/xemacs21-mule to provide /usr/bin/xemacs21 (xemacs21) in auto mode
/var/lib/dpkg/info/xemacs21-mule.postinst: 38: /var/lib/dpkg/info/xemacs21-mule.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
dpkg: xemacs21-mulesupport: dependency problems, but removing anyway as you requested:
xemacs21-mule depends on xemacs21-mulesupport (>= 2003.04.23-1).
Removing xemacs21-mulesupport (2009.02.17.dfsg.2-2) ...
Purging configuration files for xemacs21-mulesupport (2009.02.17.dfsg.2-2) ...
dpkg: xemacs21-support: dependency problems, but removing anyway as you requested:
xemacs21-bin depends on xemacs21-support (= 21.4.22-14ubuntu1).
xemacs21-mule depends on xemacs21-support (= 21.4.22-14ubuntu1).
Removing xemacs21-support (21.4.22-14ubuntu1) ...
Purging configuration files for xemacs21-support (21.4.22-14ubuntu1) ...
dpkg: xemacs21-basesupport: dependency problems, but removing anyway as you requested:
xemacs21-mule depends on xemacs21-basesupport (>= 2003.04.23-1); however:
Package xemacs21-basesupport is to be removed.
Removing xemacs21-basesupport (2009.02.17.dfsg.2-2) ...
dpkg: xemacs21-bin: dependency problems, but removing anyway as you requested:
xemacs21-mule depends on xemacs21-bin (= 21.4.22-14ubuntu1); however:
Package xemacs21-bin is to be removed.
Removing xemacs21-bin (21.4.22-14ubuntu1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
xemacs21-mule
E: Sub-process /usr/bin/dpkg returned an error code (1)
~$
答案1
我会尝试:
- 首先删除此文件:
/var/lib/dpkg/info/xemacs21-mule.postinst
然后输入以下命令:
sudo apt-get --purge remove xemacs21 sudo apt install -f sudo apt update sudo apt upgrade