【问题标题】:Error while removing php package删除php包时出错
【发布时间】:2012-08-31 10:04:39
【问题描述】:

我怎样才能摆脱这个错误?

root@excel2012:~# sudo apt-get remove php5-imagick

Reading package lists... Done

Building dependency tree... Done

The following packages will be REMOVED:

  php5-imagick

0 upgraded, 0 newly installed, 1 to remove and 43 not upgraded.

7 not fully installed or removed.

After this operation, 426 kB disk space will be freed.

Do you want to continue [Y/n]? y

(Reading database ... 25121 files and directories currently installed.)

Removing php5-imagick ...

sed: can't read /etc/php5/conf.d/imagick.ini: No such file or directory

dpkg: error processing php5-imagick (--remove):

 subprocess installed post-removal script returned error exit status 2

configured to not write apport reports
                                      Errors were encountered while processing:
 php5-imagick

E: Sub-process /usr/bin/dpkg returned an error code (1)

【问题讨论】:

  • 对于超级用户来说,这可能是一个比 SO 更好的问题。

标签: php linux installation dpkg


【解决方案1】:

编辑 /var/lib/dpkg/info/php5-imagick.postrm 并删除有关 /etc/php5/conf.d/imagick.ini 的行。然后这个包应该可以被删除。记得根据需要修改/删除 /etc/php5/conf.d/imagick.ini。

【讨论】:

    【解决方案2】:

    文件 /etc/php5/conf.d/imagick.ini 丢失。 解决方法:

    1. sudo touch /etc/php5/conf.d/imagick.ini
    2. sudo dpkg --purge --force-all php5-imagick

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多