AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 39846
Accepted
Xiè Jìléi
Xiè Jìléi
Asked: 2011-05-04 15:00:23 +0800 CST2011-05-04 15:00:23 +0800 CST 2011-05-04 15:00:23 +0800 CST

apt-get:如何覆盖另一个包中的现有文件?

  • 772

我正在尝试使用 source 为 Natty 安装 Gnome3 ,但是出现以下错误:deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu natty main

$ sudo apt-get install -f
...
Unpacking replacement gnome-games-common ...
dpkg: error processing /var/cache/apt/archives/gnome-games-common_1%3a3.0.0-      0ubuntu1~build1_i386.deb (--unpack):
 trying to overwrite '/usr/share/gnome-games-common/cards/bonded.svg', which is also in     package gnome-games-extra-data 2.30.0-1ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/gnome-games-common_1%3a3.0.0-0ubuntu1~build1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

在解决上述问题之前,我不能sudo apt-get remove gnome-games-common,也不能:gnome-games-extra-data

$ sudo apt-get remove gnome-games-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 aisleriot : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 glchess : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 glines : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gnect : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gnibbles : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gnobots2 : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gnome-mahjongg : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gnome-sudoku : Depends: gnome-games-common (>= 1:2.32.1-0ubuntu5) but it is not going to be installed
 gnomine : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gnotravex : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gnotski : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 gtali : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 iagno : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 lightsoff : Depends: gnome-games-common (>= 1:2.32.1-0ubuntu5) but it is not going to be installed
 quadrapassel : Depends: gnome-games-common (>= 1:3.0.0-0ubuntu1~build1) but it is not going to be installed
 swell-foop : Depends: gnome-games-common (>= 1:2.32.1-0ubuntu5) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我只想覆盖现有文件/usr/share/gnome-games-common/cards/bonded.svg,可以吗?

apt
  • 3 3 个回答
  • 11072 Views

3 个回答

  • Voted
  1. Best Answer
    Andrew Gunnerson
    2011-05-04T19:43:50+08:002011-05-04T19:43:50+08:00

    尝试运行:

    sudo dpkg --purge gnome-games gnome-games-common gnome-games-extra-data
    

    删除有问题的包。如果包拒绝被删除,你可以运行:

    sudo dpkg --force-overwrite --purge gnome-games gnome-games-common gnome-games-extra-data
    

    然后清除 apt 缓存并重新安装它们:

    sudo apt-get clean
    sudo apt-get install gnome-games gnome-games-common gnome-games-extra-data
    
    • 6
  2. skfd
    2011-05-04T17:22:48+08:002011-05-04T17:22:48+08:00

    您应该尝试删除gnome-games-extra-data,而不是gnome-games-common。我尝试gnome-games-extra-data从 ppa 安装然后更新 Gnome 并且没有错误。以相反的顺序做这件事很容易生气。

    • 1
  3. SOTEC
    2011-07-30T09:22:10+08:002011-07-30T09:22:10+08:00

    我所做的是按照上面的建议按名称删除每个游戏。它给了我更多错误,但列出了其他存在依赖问题的应用程序和游戏。我也删除了这些,然后 sudo apt-get update,它会自动要求我安装 gnome-games-common。从那里开始,一切似乎都运行良好。

    • 1

相关问题

  • 如何编写 shell 脚本来安装应用程序列表?

  • 如何查看存档中可用的软件包的所有版本?

  • 是否可以说出我安装的哪些软件包不在原版安装中?

  • 如何删除 PPA?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    我需要什么命令来解压缩/提取 .tar.gz 文件?

    • 8 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Marko Smith

    如何使用命令行将用户添加为新的 sudoer?

    • 7 个回答
  • Marko Smith

    更改文件夹权限和所有权

    • 9 个回答
  • Martin Hope
    EmmyS 我需要什么命令来解压缩/提取 .tar.gz 文件? 2011-02-09 14:50:41 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve