当我尝试从 ubuntu 软件中心安装或删除任何应用程序时出现此错误:Package Operation Failed
。
正如本论坛的许多帖子所建议的那样,我这样做了sudo apt-get -f install
:
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
codeblocks codeblocks-contrib codeblocks-contrib-dbg codeblocks-dbg codeblocks-dev libwxsmithlib-dev libwxsmithlib0-dev
Suggested packages:
libwxgtk2.8-dev wx-common
The following NEW packages will be installed:
libwxsmithlib-dev
The following packages will be upgraded:
codeblocks codeblocks-contrib codeblocks-contrib-dbg codeblocks-dbg codeblocks-dev libwxsmithlib0-dev
6 upgraded, 1 newly installed, 0 to remove and 243 not upgraded.
5 not fully installed or removed.
Need to get 0 B/84.4 MB of archives.
After this operation, 73.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 159995 files and directories currently installed.)
Unpacking libwxsmithlib-dev (from .../libwxsmithlib-dev_10.05-2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libwxsmithlib-dev_10.05-2_i386.deb (--unpack):
trying to overwrite '/usr/include/wxsmith/contrib/include/wx/propgrid/advprops.h', which is also in package wxsmith-headers 10.05-1
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to replace codeblocks-dev 10.05-1 (using .../codeblocks-dev_10.05-2_i386.deb) ...
Unpacking replacement codeblocks-dev ...
dpkg: error processing /var/cache/apt/archives/codeblocks-dev_10.05-2_i386.deb (--unpack):
trying to overwrite '/usr/include/codeblocks/scripting/sqplus/SqPlusConst.h', which is also in package codeblocks-headers 10.05-1
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libwxsmithlib-dev_10.05-2_i386.deb
/var/cache/apt/archives/codeblocks-dev_10.05-2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
在 GUI 下包操作失败对话框中我得到这个:
installArchives() failed: (Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 159995 files and directories currently installed.)
Unpacking libwxsmithlib-dev (from .../libwxsmithlib-dev_10.05-2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libwxsmithlib-dev_10.05-2_i386.deb (--unpack):
trying to overwrite '/usr/include/wxsmith/contrib/include/wx/propgrid/advprops.h', which is also in package wxsmith-headers 10.05-1
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to replace codeblocks-dev 10.05-1 (using .../codeblocks-dev_10.05-2_i386.deb) ...
Unpacking replacement codeblocks-dev ...
dpkg: error processing /var/cache/apt/archives/codeblocks-dev_10.05-2_i386.deb (--unpack):
trying to overwrite '/usr/include/codeblocks/scripting/sqplus/SqPlusConst.h', which is also in package codeblocks-headers 10.05-1
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libwxsmithlib-dev_10.05-2_i386.deb
/var/cache/apt/archives/codeblocks-dev_10.05-2_i386.deb
Error in function:
dpkg: dependency problems prevent configuration of codeblocks:
codeblocks depends on libcodeblocks0 (= 10.05-1); however:
Version of libcodeblocks0 on system is 10.05-2.
codeblocks depends on codeblocks-common (= 10.05-1); however:
Version of codeblocks-common on system is 10.05-2.
dpkg: error processing codeblocks (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of codeblocks-contrib:
codeblocks-contrib depends on libwxsmithlib0 (= 10.05-1); however:
Version of libwxsmithlib0 on system is 10.05-2.
codeblocks-contrib depends on codeblocks (= 10.05-1); however:
Package codeblocks is not configured yet.
dpkg: error processing codeblocks-contrib (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libwxsmithlib0-dev:
libwxsmithlib0-dev depends on wxsmith-dev (= 10.05-1); however:
Package wxsmith-dev is not installed.
dpkg: error processing libwxsmithlib0-dev (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of codeblocks-dbg:
codeblocks-dbg depends on codeblocks (= 10.05-1); however:
Package codeblocks is not configured yet.
dpkg: error processing codeblocks-dbg (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of codeblocks-contrib-dbg:
codeblocks-contrib-dbg depends on codeblocks-contrib (= 10.05-1); however:
Package codeblocks-contrib is not configured yet.
codeblocks-contrib-dbg depends on codeblocks-dbg (= 10.05-1); however:
Package codeblocks-dbg is not configured yet.
dpkg: error processing codeblocks-contrib-dbg (--configure):
dependency problems - leaving unconfigured
答案1
看起来你的系统上的 Code::Blocks 已损坏,最好将其删除并重新安装:
sudo dpkg -P all_codeblocks_pacakges_here
libwxsmith 也是如此。