我无法删除损坏的数据包

时间:2017-10-29 10:17:25

标签: ubuntu apt dpkg

我跑完后

sudo add-apt-repository ppa:oibaf/graphics-drivers

当我尝试安装任何软件包时,会发生下一个错误:

sudo apt install python3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3 is already the newest version (3.6.3-0ubuntu2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libgl1-mesa-dri : Depends: libdrm-amdgpu1 (>= 2.4.85+git1710271830.33dcc2~gd~a) but 2.4.83-1 is to be installed
 mesa-va-drivers : Depends: libdrm-amdgpu1 (>= 2.4.85+git1710271830.33dcc2~gd~a) but 2.4.83-1 is to be installed
 mesa-vdpau-drivers : Depends: libdrm-amdgpu1 (>= 2.4.85+git1710271830.33dcc2~gd~a) but 2.4.83-1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

然后我尝试用以下方法解决问题:

sudo apt --fix-broken install

使用此命令,我得到的消息是:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libdrm-amdgpu1
The following packages will be upgraded:
  libdrm-amdgpu1
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
17 not fully installed or removed.
Need to get 0 B/32.8 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 207742 files and directories currently installed.)
Preparing to unpack .../libdrm-amdgpu1_2.4.85+git1710271830.33dcc2~gd~a_i386.deb ...
Unpacking libdrm-amdgpu1:i386 (2.4.85+git1710271830.33dcc2~gd~a) over (2.4.83-1) ...
dpkg: error processing archive /var/cache/apt/archives/libdrm-amdgpu1_2.4.85+git1710271830.33dcc2~gd~a_i386.deb (--unpack):
 trying to overwrite '/usr/share/libdrm/amdgpu.ids', which is also in package libdrm-common 2.4.83-1
Errors were encountered while processing:
 /var/cache/apt/archives/libdrm-amdgpu1_2.4.85+git1710271830.33dcc2~gd~a_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

任何人都可以帮忙解决这个问题吗?以及如何解决它?

1 个答案:

答案 0 :(得分:2)

请试试这个:

sudo apt-get -o Dpkg :: Options :: =" - force-overwrite"安装libdrm-amdgpu1

sudo apt update&& sudo apt upgrade