
我遇到了有关 ldap-account-manager 删除的问题。
这里是错误。
$ sudo apt-get remove ldap-account-manager -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
fonts-dejavu php-ldap php-monolog php7.4-ldap
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
ldap-account-manager
0 upgraded, 0 newly installed, 1 to remove and 7 not upgraded.
1 not fully installed or removed.
After this operation, 74,7 MB disk space will be freed.
(Reading database ... 357061 files and directories currently installed.)
Removing ldap-account-manager (7.7-1) ...
apache2.service is not active, cannot reload.
invoke-rc.d: initscript apache2, action "reload" failed.
dpkg: error processing package ldap-account-manager (--remove):
installed ldap-account-manager package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
ldap-account-manager
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Linux hozer 5.11.0-25-generic #27~20.04.1-Ubuntu SMP 星期二 7 月 13 日 17:41:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ apt-cache policy ldap-account-manager
ldap-account-manager:
Installed: 7.7-1
Candidate: 7.7-1
Version table:
*** 7.7-1 100 100 /var/lib/dpkg/status
6.7-1 500
500 http://tr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
500 http://tr.archive.ubuntu.com/ubuntu focal/universe i386 Packages
答案1
您必须强制删除这个有问题的包
sudo dpkg -P --force-all ldap-account-manager
sudo apt-get autoremove