如何解决“dpkg:错误处理存档/var/cache/apt/archives/libvdpau1_1.1.1-3ubuntu1_amd64.deb”

如何解决“dpkg:错误处理存档/var/cache/apt/archives/libvdpau1_1.1.1-3ubuntu1_amd64.deb”

我在使用更新管理器时遇到问题。正常安装时出现以下情况:

~$ sudo apt-get install
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:
ffmpeg : Depends: libvdpau1 (>= 0.2) but it is not installed
mesa-vdpau-drivers : Depends: libvdpau1 but it is not installed
vdpau-va-driver : Depends: libvdpau1 (>= 0.2) but it is not installed
E: Unmet dependencies. Try using -f.

使用推荐的选项:

~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
 libvdpau1
The following NEW packages will be installed:
 libvdpau1
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
6 not fully installed or removed.
Need to get 0 B/25,5 kB of archives.
After this operation, 100 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 235502 files and directories currently installed.)
Preparing to unpack .../libvdpau1_1.1.1-3ubuntu1_amd64.deb ...
Unpacking libvdpau1:amd64 (1.1.1-3ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libvdpau1_1.1.1-3ubuntu1_amd64.deb (--unpack):
 trying to overwrite shared '/etc/vdpau_wrapper.cfg', which is different from other instances of package libvdpau1:amd64
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libvdpau1_1.1.1-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

有人知道问题可能是什么吗?我尝试了这里所有类似问题的解决方案,但都没有用。

答案1

-删除 vdpau_wrapper.cfg 文件并强制安装

sudo rm -rf /etc/vdpau_wrapper.cfg

sudo apt-get install -f 

答案2

以下对我有用:

sudo apt-get remove libvdpau1

sudo apt-get -y install libvdpau1

然后我安装了被阻止的软件包。

相关内容