0

I have a problem about ldap-account-manager remove.

Here is errors.

$ 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 Tue Jul 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
4
  • What is your Ubuntu version? How did you got 7.7 version of the package?
    – N0rbert
    Nov 9, 2021 at 7:25
  • Linux hozer 5.11.0-25-generic #27~20.04.1-Ubuntu SMP Tue Jul 13 17:41:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    – hsyn
    Nov 9, 2021 at 7:35
  • Please add output of apt-cache policy ldap-account-manager to the question by editing it.
    – N0rbert
    Nov 9, 2021 at 7:44
  • 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
    – hsyn
    Nov 9, 2021 at 7:45

1 Answer 1

0

You have to remove this problematic package forcibly by

sudo dpkg -P --force-all ldap-account-manager
sudo apt-get autoremove
6
  • $ sudo dpkg -P --force-all ldap-account-manager (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 (--purge): installed ldap-account-manager package post-removal script subprocess returned error exit status 1 Errors were encountered while processing: ldap-account-manager
    – hsyn
    Nov 9, 2021 at 7:52
  • I can start apache2.service btw
    – hsyn
    Nov 9, 2021 at 7:56
  • Then install normal official package by sudo apt-get install --reinstall ldap-account-manager=6.7-1 and then retry removal.
    – N0rbert
    Nov 9, 2021 at 8:00
  • Ok i install 6.7.1 but still can't remove 7.7-1
    – hsyn
    Nov 9, 2021 at 8:33
  • Thanks for help solved.
    – hsyn
    Nov 10, 2021 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .