Android error: install libsdl-dev 未满足的依赖关系

Android编译时需要用到 libsdl-dev 库:

安装时遇到错误:

sudo apt-get install libsdl-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
注意,选取 libsdl1.2-dev 而非 libsdl-dev
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
  libsdl1.2-dev: 依赖: libsdl1.2debian (= 1.2.14-4ubuntu1) 但是 1.2.14-4ubuntu1.1 正要被安装
                 依赖: libx11-dev 但是它将不会被安装
                 依赖: libglu1-mesa-dev 但是它将不会被安装
                 依赖: libpulse-dev 但是它将不会被安装
                 依赖: libdirectfb-dev (>= 0.9.22) 但是它将不会被安装
                 依赖: libaa1-dev 但是它将不会被安装
                 依赖: libcaca-dev 但是它将不会被安装
                 依赖: libxt-dev 但是它将不会被安装
                 依赖: libxext-dev 但是它将不会被安装
E: 破损的软件包
更换源解决问题:

打开 /etc/apt/下的sources.list:

用以下内容替换原来旧的内容 (当然如果必要,需要备份原来内容):

#deb cdrom:[Ubuntu 10.04.3 LTS _Lucid Lynx_ - Release i386 (20110720.1)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://cn.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid universe
deb http://cn.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://cn.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu lucid partner
# deb-src http://archive.canonical.com/ubuntu lucid partner

deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse
保存后执行:

sudo apt-get update
sudo apt-get install libsdl-dev

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。