LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 922|回复: 2

安装deb, 因内部 postin 和 prerm 脚本执行出错导致dpkg和 apt-get 彻底不能用, 该

[复制链接]
发表于 2009-11-25 21:58:59 | 显示全部楼层 |阅读模式
安装一个deb软件包, 因为 软件包内部 postin 和 prerm 脚本执行出错, 导致dpkg和 apt-get 彻底不能用.
連 synaptic 也不能用,一启动synaptic就报告adobe-flashplugin有问题,然后就退出.
总是提示重新安装该软件包才能remove, 疯了.

  1. sudo apt-get install remove --purge adobe-flashplugin
  2. Reading package lists... Done
  3. Building dependency tree      
  4. Reading state information... Done
  5. E: The package adobe-flashplugin needs to be reinstalled, but I can't find an archive for it.
复制代码

  1. sudo dpkg -i adobe-flashplugin_10.0.12.36-1hardy1_i386.deb
  2. (Reading database ... 123136 files and directories currently installed.)
  3. Preparing to replace adobe-flashplugin 10.0.12.36-1hardy1 (using adobe-flashplugin_10.0.12.36-1hardy1_i386.deb) ...
  4. update-alternatives: error: no alternatives for iceape-flashplugin.
  5. update-alternatives: error: no alternatives for iceape-flashplugin.
  6. dpkg: warning: old pre-removal script returned error exit status 2
  7. dpkg - trying script from the new package instead ...
  8. update-alternatives: error: no alternatives for iceape-flashplugin.
  9. update-alternatives: error: no alternatives for iceape-flashplugin.
  10. dpkg: error processing adobe-flashplugin_10.0.12.36-1hardy1_i386.deb (--install):
  11. subprocess new pre-removal script returned error exit status 2
  12. postinst called with argument `abort-upgrade'
  13. dpkg: error while cleaning up:
  14. subprocess installed post-installation script returned error exit status 1
  15. Errors were encountered while processing:
  16. adobe-flashplugin_10.0.12.36-1hardy1_i386.deb
复制代码

  1. sudo dpkg -r --force-all adobe-flashplugin
  2. dpkg: warning: overriding problem because --force enabled:
  3. Package is in a very bad inconsistent state - you should
  4. reinstall it before attempting a removal.
  5. (Reading database ... 123135 files and directories currently installed.)
  6. Removing adobe-flashplugin ...
  7. update-alternatives: error: no alternatives for iceape-flashplugin.
  8. update-alternatives: error: no alternatives for iceape-flashplugin.
  9. dpkg: error processing adobe-flashplugin (--remove):
  10. subprocess installed pre-removal script returned error exit status 2
  11. postinst called with argument `abort-remove'
  12. dpkg: error while cleaning up:
  13. subprocess installed post-installation script returned error exit status 1
  14. Errors were encountered while processing:
  15. adobe-flashplugin
复制代码

  1. sudo apt-get -f install
  2. Reading package lists... Done
  3. Building dependency tree      
  4. Reading state information... Done
  5. E: The package adobe-flashplugin needs to be reinstalled, but I can't find an archive for it.
复制代码


大家说该怎么办?
发表于 2009-11-25 23:25:54 | 显示全部楼层
我碰到过类似卡壳的情况,去/var/lib/dpkg/info把相关文件删掉,再把var/lib/dpkg/status里面跟这个软件有关的一段删掉。不知对你这样的情况是否有用,或者治治标不再报错。
回复 支持 反对

使用道具 举报

发表于 2009-11-26 10:39:26 | 显示全部楼层
把/var/lib/dpkg/info中的相关内容写成空, 然后再运行apt-get remove --purge  adobe-flashplugin
这一操作可能造成系统内有些文件不属于任何软件包的情况. 慎重使用.
如果系统比较重要, 建议先做系统备份.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表