Ok, finalmente consegui corrigi-lo:
- Removendo manualmente as entradas do apcupsd do arquivo / var / lib / dpkg / status.
- Removendo manualmente as pastas do programa apcupsd.
Espero que ajude alguém.
Felicidades!
Eu instalei recentemente o pacote apcupsd do meu sistema e decidi removê-lo. Quando eu tento removê-lo, ele falha.Belas informações são algumas:
> uname -a Linux 3.5.0-26-generic #42~precise1-Ubuntu SMP Mon
> Mar 11 22:17:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>
> sudo apt-get -f install apcupsd Reading package lists... Done Building
> dependency tree Reading state information... Done apcupsd is
> already the newest version. 0 upgraded, 0 newly installed, 0 to remove
> and 7 not upgraded. 1 not fully installed or removed. Need to get 0
> B/281 kB of archives. After this operation, 0 B of additional disk
> space will be used. Do you want to continue [Y/n]?
>
> (Reading database ... 454090 files and directories currently
> installed.) Preparing to replace apcupsd 3.14.10-1 (using
> .../apcupsd_3.14.10-1_amd64.deb) ... Unpacking replacement apcupsd ...
> invoke-rc.d: unknown initscript, /etc/init.d/apcupsd not found. cat:
> /var/lib/acpi-support/system-manufacturer: No such file or directory
> cat: /var/lib/acpi-support/system-product-name: No such file or
> directory cat: /var/lib/acpi-support/system-version: No such file or
> directory cat: /var/lib/acpi-support/bios-version: No such file or
> directory dpkg: warning: subprocess old post-removal script returned
> error exit status 1 dpkg - trying script from the new package instead
> ... invoke-rc.d: unknown initscript, /etc/init.d/apcupsd not found.
> cat: /var/lib/acpi-support/system-manufacturer: No such file or
> directory cat: /var/lib/acpi-support/system-product-name: No such file
> or directory cat: /var/lib/acpi-support/system-version: No such file
> or directory cat: /var/lib/acpi-support/bios-version: No such file or
> directory dpkg: error processing
> /var/cache/apt/archives/apcupsd_3.14.10-1_amd64.deb (--unpack):
> subprocess new post-removal script returned error exit status 1
> invoke-rc.d: unknown initscript, /etc/init.d/apcupsd not found. cat:
> /var/lib/acpi-support/system-manufacturer: No such file or directory
> cat: /var/lib/acpi-support/system-product-name: No such file or
> directory cat: /var/lib/acpi-support/system-version: No such file or
> directory cat: /var/lib/acpi-support/bios-version: No such file or
> directory dpkg: error while cleaning up: subprocess new post-removal
> script returned error exit status 1 Processing triggers for ureadahead
> ... Processing triggers for man-db ... Errors were encountered while
> processing: /var/cache/apt/archives/apcupsd_3.14.10-1_amd64.deb E:
> Sub-process /usr/bin/dpkg returned an error code (1)
>
> sudo apt-get remove apcupsd Reading package lists... Done Building
> dependency tree Reading state information... Done The following
> packages will be REMOVED: apcupsd 0 upgraded, 0 newly installed, 1
> to remove and 7 not upgraded. 1 not fully installed or removed. After
> this operation, 749 kB disk space will be freed. Do you want to
> continue [Y/n]? dpkg: error processing apcupsd (--remove): Package
> is in a very bad inconsistent state - you should reinstall it before
> attempting a removal. Errors were encountered while processing:
> apcupsd E: Sub-process /usr/bin/dpkg returned an error code (1)
Alguém pode ajudar por favor?
Obrigado Yannis
Eu tentei de tudo e por algum motivo não desinstala!
sudo apt-get --reinstall install apcupsd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
17 not fully installed or removed.
Need to get 0 B/281 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 454211 files and directories currently installed.)
Preparing to replace apcupsd 3.14.10-1 (using .../apcupsd_3.14.10-1_amd64.deb) ...
Unpacking replacement apcupsd ...
invoke-rc.d: unknown initscript, /etc/init.d/apcupsd not found.
cat: /var/lib/acpi-support/system-manufacturer: No such file or directory
cat: /var/lib/acpi-support/system-product-name: No such file or directory
cat: /var/lib/acpi-support/system-version: No such file or directory
cat: /var/lib/acpi-support/bios-version: No such file or directory
dpkg: warning: subprocess old post-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
invoke-rc.d: unknown initscript, /etc/init.d/apcupsd not found.
cat: /var/lib/acpi-support/system-manufacturer: No such file or directory
cat: /var/lib/acpi-support/system-product-name: No such file or directory
cat: /var/lib/acpi-support/system-version: No such file or directory
cat: /var/lib/acpi-support/bios-version: No such file or directory
dpkg: error processing /var/cache/apt/archives/apcupsd_3.14.10-1_amd64.deb (--unpack):
subprocess new post-removal script returned error exit status 1
invoke-rc.d: unknown initscript, /etc/init.d/apcupsd not found.
cat: /var/lib/acpi-support/system-manufacturer: No such file or directory
cat: /var/lib/acpi-support/system-product-name: No such file or directory
cat: /var/lib/acpi-support/system-version: No such file or directory
cat: /var/lib/acpi-support/bios-version: No such file or directory
dpkg: error while cleaning up:
subprocess new post-removal script returned error exit status 1
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/apcupsd_3.14.10-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get remove apcupsd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
apcupsd
0 upgraded, 0 newly installed, 1 to remove and 7 not upgraded.
17 not fully installed or removed.
After this operation, 749 kB disk space will be freed.
Do you want to continue [Y/n]?
dpkg: error processing apcupsd (--remove):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
Errors were encountered while processing:
apcupsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ok, finalmente consegui corrigi-lo:
Espero que ajude alguém.
Felicidades!
Eu pude ler um pouco disso, e a melhor solução é reinstalar o pacote como diz o apt-get no final, depois desinstalá-lo:
sudo apt-get --reinstall install apcupsd
sudo apt-get remove apcupsd
Isso deve resolver seu problema.