因此,我尝试使用 [本指南][1] 在 Ubuntu 18.04 上安装 RetroPie,但运行后./retropie_setup.sh
,出现以下错误sudo apt uprade
:
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libsdl2-2.0-0 : Breaks: libsdl2-2.0-0:i386 (!= 2.0.8+1) but 2.0.8+dfsg1-1ubuntu1.18.04.1 is installed
libsdl2-2.0-0:i386 : Breaks: libsdl2-2.0-0 (!= 2.0.8+dfsg1-1ubuntu1.18.04.1) but 2.0.8+1 is installed
libsdl2-dev : Depends: libsdl2-2.0-0 (= 2.0.8+dfsg1-1ubuntu1.18.04.1) but 2.0.8+1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我sudo apt --fix-broken install
尝试修复此问题但收到更多错误:
$ 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:
libsdl2-2.0-0
The following packages will be upgraded:
libsdl2-2.0-0
1 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
19 not fully installed or removed.
Need to get 0 B/378 kB of archives.
After this operation, 111 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 265018 files and directories currently installed.)
Preparing to unpack .../libsdl2-2.0-0_2.0.8+dfsg1-1ubuntu1.18.04.1_amd64.deb ...
Unpacking libsdl2-2.0-0:amd64 (2.0.8+dfsg1-1ubuntu1.18.04.1) over (2.0.8+1) ...
dpkg: error processing archive /var/cache/apt/archives/libsdl2-2.0-0_2.0.8+dfsg1-1ubuntu1.18.04.1_amd64.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libsdl2-2.0-0/copyright', which is different from other instances of package libsdl2-2.0-0:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libsdl2-2.0-0_2.0.8+dfsg1-1ubuntu1.18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该如何修复此问题?
答案1
我跟着这些说明然后跑了
sudo mv /usr/share/doc/libsdl2-2.0-0/copyright /usr/share/doc/libsdl2-2.0-0/copyright.backup
sudo apt --fix-broken install` and that seems to work.
现在我收到的唯一信息是
W: APT had planned for dpkg to do more than it reported back (150 vs 154).
Affected packages: libsdl2-dev:amd64