Проблема с удалением пакета apcupsd из Ubuntu 12.04

Я недавно установил пакет apcupsd из своей системы, а затем решил удалить его. Когда я пытаюсь удалить его, происходит сбой. Ниже приведена некоторая информация:

> 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)

Может кто-нибудь помочь, пожалуйста?

Спасибо, Яннис

<час>

Я попробовал все и по какой-то причине он не удаляется!

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)
0
задан 3 September 2013 в 20:15

2 ответа

Я мог читать немного, что, и самое лучшее решение переустановить пакет, как он говорит, кв-получить в самом конце, а затем удалить его:

sudo apt-get --reinstall install apcupsd
sudo apt-get remove apcupsd

Это должно решить вашу проблему [. 112]

0
ответ дан 3 September 2013 в 20:15

Хорошо, наконец-то мне удалось это исправить:

  1. Удаление записей apcupsd вручную из файла / var / lib / dpkg / status.
  2. Удаление папок программ apcupsd вручную.

Надеюсь, это кому-нибудь поможет.

Ура!

0
ответ дан 3 September 2013 в 20:15

Другие вопросы по тегам:

Похожие вопросы: