Я получаю сообщение об ошибке ниже, когда пытаюсь установить любой пакет с помощью apt-get.

Я использую Ubuntu 12.04 LTS и мои репозитории обновляются (результаты поиска apt-cache возвращают пакеты)

Это произошло после того, как я попытался установить openldap на этот компьютер, который не удался, удалил пакеты и удалил некоторые файлы вручную.

Как мне решить это?

> Suggested packages: ldap-utils The following packages will be
> upgraded: slapd 1 upgraded, 0 newly installed, 0 to remove and 68 not
> upgraded. 1 not fully installed or removed. 
> 
> Need to get 0 B/1,730 kB of archives. 
> 
> After this operation, 1,024 B of additional disk space will be used.
> Preconfiguring packages ... (Reading database ... 186282 files and
> directories currently installed.) 
> 
> Preparing to replace slapd 2.4.28-1.1ubuntu4.4 (using
> .../slapd_2.4.28-1.1ubuntu4.6_amd64.deb) ... * The pidfile for slapd
> has not been specified invoke-rc.d: initscript slapd, action "stop"
> failed. dpkg: warning: subprocess old pre-removal script returned
> error exit status 1 dpkg: trying script from the new package instead
> ... * The pidfile for slapd has not been specified invoke-rc.d:
> initscript slapd, action "stop" failed. dpkg: error processing
> /var/cache/apt/archives/slapd_2.4.28-1.1ubuntu4.6_amd64.deb
> (--unpack): subprocess new pre-removal script returned error exit
> status 1 Backing up /etc/ldap/slapd.d in
> /var/backups/slapd-2.4.28-1.1ubuntu4.6... done. grep:
> /etc/ldap/slapd.d/cn=config/olcDatabase*: No such file or directory *
> The pidfile for slapd has not been specified invoke-rc.d: initscript
> slapd, action "start" failed. dpkg: error while cleaning up:
> subprocess installed post-installation script returned error exit
> status 1 Errors were encountered while processing:
> /var/cache/apt/archives/slapd_2.4.28-1.1ubuntu4.6_amd64.deb E:
> Sub-process /usr/bin/dpkg returned an error code (1)

0