在 lubuntu 12.10 上安装 sdl2 时出错

在 lubuntu 12.10 上安装 sdl2 时出错

尝试安装热爱游戏引擎但我似乎无法安装 SDL2。我收到有关其依赖项的错误。我在 Google 上搜索并尝试清除,但没有成功。我该如何修复/正确安装 sdl2?

我尝试了 -f,但没有用

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
 libsdl2.0debian
The following NEW packages will be installed:
 libsdl2.0debian
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
9 not fully installed or removed.
Need to get 0 B/346 kB of archives.
After this operation, 954 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 302833 files and directories currently installed.)
Unpacking libsdl2.0debian:amd64 (from .../libsdl2.0debian_2.0-20130310-2~quantal1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libsdl2.0debian_2.0-20130310-2~quantal1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.0.0', which is also in package libsdl2-2.0-0:amd64 2.0.0+dfsg1-quantal1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 /var/cache/apt/archives/libsdl2.0debian_2.0-20130310-2~quantal1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (

liblove 的输出:

$ sudo apt-get install liblove
  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:
   liblove : Depends: libluajit-5.1-2 but it is not going to be installed
       Depends: libphysfs1 (>= 1.1.1) but it is not going to be installed
       Depends: libsdl2 (>= 2.0.1) but it is not going to be installed
       Depends: libphysfs-1.0-0
   libsdl2-image1.2 : Depends: libsdl2.0debian but it is not going to be installed
   libsdl2-mixer1.2 : Depends: libsdl2.0debian but it is not going to be installed
   libsdl2.0-dev : Depends: libsdl2.0debian (= 2.0-20130310-2~quantal1) but it is not going to be installed
   E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

[编辑]@Avinash

sudo dpkg -r libsdl2-2.0-0
dpkg: warning: ignoring request to remove libsdl2-2.0-0:amd64, only the config
files of which are on the system; use --purge to remove them too

[编辑2]

当我尝试安装 liblove/love 依赖项时,这是输出

Reading package lists... Done
Building dependency tree       
Reading state information... Done
 autotools-dev is already the newest version.
 autotools-dev set to manually installed.
 build-essential is already the newest version.
 libflac-dev is already the newest version.
 libogg-dev is already the newest version.
 libvorbis-dev is already the newest version.
 pkg-config is already the newest version.
 libdevil-dev is already the newest version.
 libopenal-dev is already the newest version.
 libfreetype6-dev is already the newest version.
Some packages could not be installed. This may mean that you have
 requested an impossible situation or if you are using the unstable
 distribution that some required packages have not yet been created
 or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libsdl2-dev : Depends: libsdl2 (= 2.0.1ppa1quantal1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

答案1

首先libsdl2-2.0-0通过运行删除包,

sudo dpkg -r libsdl2-2.0-0

然后尝试,

sudo apt-get -f install

现在尝试liblove使用 aptitude 安装软件包,

sudo apt-get install aptitude
sudo aptitude install liblove

相关内容