安装libncurses5-dev

ubuntu9.10,按照嵌入式开发板用户手册,安装libncurses5-dev时运行#sudo apt-get install libncurses5-dev,但提示找不到软件包。搜到方法如下。

(以下http://blog.chinaunix.net/uid-26021340-id-3031278.html)

1.写命令sudo gedit /etc/apt/sources.list
2.将里面的内容全部删除用下面的源进行代替:
#
# deb cdrom:[Ubuntu 7.04 _Feisty Fawn_ - Daily Build i386 (20070407)]/ hardy main restricted

#deb cdrom:[Ubuntu 7.04 _Feisty Fawn_ - Daily Build i386 (20070407)]/ hardy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted

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

## 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
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy 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://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy 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://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu hardy-security main restricted
#deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
#deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
#deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse
deb http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
#deb-src http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
#deb-src http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
#deb-src http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
#deb-src http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
#deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
#deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
#deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
#deb-src http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
#deb-src http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
## debian.ustc.edu.cn/ubuntu/ mirror from archive.ubuntu.com
#
deb http://debian.ustc.edu.cn/ubuntu/ hardy main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ hardy-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
#
#deb-src http://debian.ustc.edu.cn/ubuntu/ hardy main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-backports main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
#
## sjtu
#deb http://ftp.sjtu.edu.cn/ubuntu/ hardy main restricted universe multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-backports restricted universe multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
##
#deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy main restricted universe multiverse
#deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-backports main restricted universe multiverse
#deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
#deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
#deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
#
# openware@bupt
#hardy
#deb ftp://openware.byr.edu.cn/pub/mirror/ubuntu/ hardy main multiverse restricted universe
#deb ftp://openware.byr.edu.cn/pub/mirror/ubuntu/ hardy-backports main multiverse restricted universe
#deb ftp://openware.byr.edu.cn/pub/mirror/ubuntu/ hardy-proposed main multiverse restricted universe
#deb ftp://openware.byr.edu.cn/pub/mirror/ubuntu/ hardy-security main multiverse restricted universe
#deb ftp://openware.byr.edu.cn/pub/mirror/ubuntu/ hardy-updates main multiverse restricted universe
#

3.apt-get update,apt-get upgrade。使用aptitude show libncurses5-dev可以看到state为not installed。

(以下http://blog.csdn.net/acanoe/article/details/7051992)

4.使用apt-get install libncurses5-dev时出现下述报错:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
  libncurses5-dev: Depends: libncurses5 (= 5.6+20071124-1ubuntu2) but 5.7+20090803-2ubuntu2 is to be installed
E: Broken packages

改用aptitude install libncurses5-dev,最后运行结果为

Setting up libncurses5-dev (5.6+20071124-1ubuntu2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done

完成安装。感觉找到一个可用的源是最重要的。

稍微搜了一下apt-get和aptitude的区别,先有个大体印象。(以下http://blog.sina.com.cn/s/blog_62a9902f0100gfkk.html)aptitude 与 apt-get 一样,是 Debian 及其衍生系统中功能极其强大的包管理工具。与 apt-get 不同的是,aptitude 在处理依赖问题上更佳一些。举例来说,aptitude 在删除一个包时,会同时删除本身所依赖的包。这样,系统中不会残留无用的包,整个系统更为干净。

你可能感兴趣的:(Debian,Security,ubuntu,processing,dependencies,triggers)