dpkg error: trying to overwrite X, which is also in package Y

今天ubuntu9.10 alpha4 升级出现了点问题:

Preparing to replace language-pack-zh 1:9.10 (using .../language-pack-zh_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-zh ...
Preparing to replace language-pack-zh-base 1:9.10 (using .../language-pack-zh-base_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-zh-base ...
dpkg: error processing /var/cache/apt/archives/language-pack-zh-base_1%3a9.10+20090805_all.deb (--unpack):
trying to overwrite `/usr/share/locale-langpack/zh_TW/LC_MESSAGES/sed.mo', which is also in package language-pack-zh-hant-base
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Preparing to replace language-pack-gnome-zh 1:9.10 (using .../language-pack-gnome-zh_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-gnome-zh ...
Preparing to replace language-pack-gnome-zh-base 1:9.10 (using .../language-pack-gnome-zh-base_1%3a9.10+20090805_all.deb) ...
Unpacking replacement language-pack-gnome-zh-base ...
dpkg: error processing /var/cache/apt/archives/language-pack-gnome-zh-base_1%3a9.10+20090805_all.deb (--unpack):
trying to overwrite `/usr/share/locale-langpack/zh_TW/LC_MESSAGES/gnome-settings-daemon.mo', which is also in package language-pack-gnome-zh-hant-base

中文的显示是这样:

(正在读取数据库 ... 系统当前总共安装有 123909 个文件和目录。)
正在解压缩 language-pack-gnome-zh-hans-base (从 .../language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb) ...
dpkg:处理 /var/cache/apt/archives/language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb (--unpack)时出错:
正试图覆盖“/usr/share/locale-langpack/zh_CN/LC_MESSAGES/gnome-settings-daemon.mo”,它属于软件包 language-pack-gnome-zh-base
dpkg-deb: 子进程 粘贴 被信号(Broken pipe)终止了
正在解压缩 language-pack-gnome-zh-hant-base (从 .../language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb) ...
dpkg:处理 /var/cache/apt/archives/language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb (--unpack)时出错:
正试图覆盖“/usr/share/locale-langpack/zh_TW/LC_MESSAGES/gnome-settings-daemon.mo”,它属于软件包 language-pack-gnome-zh-base
dpkg-deb: 子进程 粘贴 被信号(Broken pipe)终止了
在处理时有错误发生:
/var/cache/apt/archives/language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb
/var/cache/apt/archives/language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

类似这样的错误:

dpkg: error processing /var/cache/apt/archives/AAA (--unpack):
trying to overwrite `/usr/lib/BBB', which is also in package CCC
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
AAA
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决方法:

sudo dpkg -i --force-overwrite AAA

(give full path of AAA), and then run

sudo apt-get -f install

again.

[via(翻墙的需要..)]

打开支付宝首页搜索“515750224”,即可领取红包

标签: Debian

添加新评论