我使用 dpkg 和 apt-get 来安装、清除、删除爷爷软件包有不同版本。这一切都发生在我无法完全删除它并安装干净的情况。
$ sudo apt-get remove gramps
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'gramps' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded
$ sudo dpkg -r gramps
dpkg: warning: ignoring request to remove gramps which isn't installed
$ locate gramps
See: https://gist.github.com/anonymous/5da63c802469fa8cb20b
$ sudo apt-get install gramps
...
Unpacking gramps (from .../gramps_3.4.0-1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/gramps_3.4.0-1_all.deb (--unpack):
trying to overwrite '/usr/share/mime/packages/gramps.xml', which is also in package python-gramps 4.1.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
答案1
您是否已使用 更新过您的包索引apt-get update
?
看起来它失败了trying to overwrite '/usr/share/mime/packages/gramps.xml', which is also in package python-gramps 4.1.1
/usr/share/mime/packages/gramps.xml
如果您想保留该文件,您可以尝试备份它,或者直接删除它,然后看看它是否可以安装?
我本来想尝试清除该软件包,但由于它已被删除,因此会很麻烦。如果此操作失败,删除“python-gramps”可能会有所帮助,但如果存在冲突,则在尝试安装“gramps”时应该会收到此类警告。