我正在尝试更新我的 Ubuntu 14.10,但在过去的几周里,软件包终端总是失败,而其余部分则运行良好。
$ sudo apt-get update && sudo apt-get upgrade
(Reading database ... 309452 files and directories currently installed.)
Preparing to unpack .../gnome-terminal-data_3.12.3-0ubuntu1~utopic2_all.deb ...
Unpacking gnome-terminal-data (3.12.3-0ubuntu1~utopic2) over (3.12.3-0ubuntu1~trusty1) ...
dpkg: error processing archive /var/cache/apt/archives/gnome-terminal-data_3.12.3-0ubuntu1~utopic2_all.deb (--unpack):
trying to overwrite '/usr/share/gnome-shell/search-providers/gnome-terminal-search-provider.ini', which is also in package gnome-terminal 3.12.3-0ubuntu1~trusty1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../gnome-terminal_3.12.3-0ubuntu1~utopic2_amd64.deb ...
Unpacking gnome-terminal (3.12.3-0ubuntu1~utopic2) over (3.12.3-0ubuntu1~trusty1) ...
dpkg: error processing archive /var/cache/apt/archives/gnome-terminal_3.12.3-0ubuntu1~utopic2_amd64.deb (--unpack):
trying to overwrite '/usr/share/appdata/gnome-terminal.appdata.xml', which is also in package gnome-terminal-data 3.12.3-0ubuntu1~trusty1
Processing triggers for man-db (2.7.0.2-2) ...
Processing triggers for bamfdaemon (0.5.1+14.10.20140925-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu2) ...
Processing triggers for mime-support (3.55ubuntu1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for libglib2.0-0:amd64 (2.42.1-1~ubuntu1) ...
Processing triggers for libglib2.0-0:i386 (2.42.1-1~ubuntu1) ...
Errors were encountered while processing:
/var/cache/apt/archives/gnome-terminal-data_3.12.3-0ubuntu1~utopic2_all.deb
/var/cache/apt/archives/gnome-terminal_3.12.3-0ubuntu1~utopic2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
那么这里出了什么问题?
答案1
答案是错误的;我刚刚删除了gnome-terminal
sudo apt-get remove gnome-terminal
然后更新成功gnome-terminal-data
sudo apt-get update
然后我重新安装了gnome-terminal
sudo apt-get install gnome-terminal
答案2
您的 中似乎至少有一个 Trusty (14.04) 源/etc/apt/sources.list
,或者您之前已从 14.04 部分升级到 14.10。由于您似乎没有很长的更新列表,我们可以假设前者。
Unpacking gnome-terminal-data (3.12.3-0ubuntu1~utopic2) over (3.12.3-0ubuntu1~trusty1) ...
Unpacking gnome-terminal (3.12.3-0ubuntu1~utopic2) over (3.12.3-0ubuntu1~trusty1) ...
检查你的系统设置-->软件和更新,并取消选中那些较旧的来源。