[问题]apt指定本地源的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
recallshan
帖子: 87
注册时间: 2007-08-25 18:02
来自: 湖南株洲

[问题]apt指定本地源的问题

#1

帖子 recallshan » 2008-01-02 2:02

我下了4个debian 的iso 来用作本地源

/etc/apt/sources.list 内容
deb file:/mnt/iso/iso1 stable main contrib
deb file:/mnt/iso/iso2 stable main contrib
deb file:/mnt/iso/iso3 stable main contrib
deb file:/mnt/iso/iso4 stable main contrib


/etc/fstab 内容
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda8 / ext3 defaults,errors=remount-ro 0 1
/dev/hda10 /boot ext3 defaults 0 2
/dev/hda12 /home ext3 defaults 0 2
/dev/hda11 /usr ext3 defaults 0 2
/dev/hda9 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0

#WIN NTFS And FAT32
/dev/hda1 /mnt/hda/hda1 ntfs iocharset=utf8,users,exec,ro,umask=000 0 0
/dev/hda5 /mnt/hda/hda5 ntfs iocharset=utf8,users,exec,ro,umask=000 0 0
/dev/hda6 /mnt/hda/hda6 ntfs iocharset=utf8,users,exec,ro,umask=000 0 0
/dev/hda7 /mnt/hda/hda7 vfat iocharset=utf8,users,exec 0 0

#APT
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-1.iso /mnt/iso/iso1
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-2.iso /mnt/iso/iso2
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-3.iso /mnt/iso/iso3
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-4.iso /mnt/iso/iso4


为什么安装软件会出现 以下错误


debian:/home/shan# apt-get install fcitx
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
推荐安装的软件包:
im-switch ttf-arphic-gbsn00lp ttf-arphic-gkai00mp
下列【新】软件包将被安装:
fcitx
共升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。
需要下载 0B/3290kB 的软件包。
解压缩后会消耗掉 7909kB 的额外空间。
【警告】:下列的软件包不能通过验证!
fcitx
不经验证就安装这些软件包么?[y/N] y
W: 无法获取源软件包列表 file: stable/contrib Packages (/var/lib/apt/lists/_mnt_iso_iso2_dists_stable_contrib_binary-i386_Packages) 的状态 - stat (2 没有那个文件或目录)
W: 无法获取源软件包列表 file: stable/contrib Packages (/var/lib/apt/lists/_mnt_iso_iso3_dists_stable_contrib_binary-i386_Packages) 的状态 - stat (2 没有那个文件或目录)
选中了曾被取消选择的软件包 fcitx。
(正在读取数据库 ... 系统当前总共安装有 51504 个文件和目录。)
正在解压缩 fcitx (从 .../f/fcitx/fcitx_3.4.3-1_i386.deb) ...
正在设置 fcitx (3.4.3-1) ...

W: 无法获取源软件包列表 file: stable/contrib Packages (/var/lib/apt/lists/_mnt_iso_iso2_dists_stable_contrib_binary-i386_Packages) 的状态 - stat (2 没有那个文件或目录)
W: 无法获取源软件包列表 file: stable/contrib Packages (/var/lib/apt/lists/_mnt_iso_iso3_dists_stable_contrib_binary-i386_Packages) 的状态 - stat (2 没有那个文件或目录)
W: 您可能需要运行 apt-get update 来解决这些问题



第一个问题是 无法通过验证, 为什么iso 里的文件都无法通过验证呢?


第二个问题是 怎么会出现无法获取源软件包列表 (如下)
W: 无法获取源软件包列表 file: stable/contrib Packages (/var/lib/apt/lists/_mnt_iso_iso2_dists_stable_contrib_binary-i386_Packages) 的状态 - stat (2 没有那个文件或目录)
W: 无法获取源软件包列表 file: stable/contrib Packages (/var/lib/apt/lists/_mnt_iso_iso3_dists_stable_contrib_binary-i386_Packages) 的状态 - stat (2 没有那个文件或目录)
W: 您可能需要运行 apt-get update 来解决这些问题


第三个问题是 /etc/fstab 自动挂载 (如下)
#APT
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-1.iso /mnt/iso/iso1
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-2.iso /mnt/iso/iso2
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-3.iso /mnt/iso/iso3
mount -o loop /mnt/hda/hda6/System/linux/debian-40r1-i386-CD-4.iso /mnt/iso/iso4
这一段没有用, 手动挂载才有用
原以为不能用挂载的目录 /mnt 再次挂载 , 就把iso放在 /home/shan 文件夹里,结果还是一样
recallshan
帖子: 87
注册时间: 2007-08-25 18:02
来自: 湖南株洲

#2

帖子 recallshan » 2008-01-02 17:35

:cry: 没人指点下吗
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

#3

帖子 leeaman » 2008-01-02 17:43

代码: 全选

sudo apt-get update
一下看看,还有你确定本地源是那个样子写得吗?

http://www.eyea.net/bbs/index.php?mods= ... &postid=43
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
recallshan
帖子: 87
注册时间: 2007-08-25 18:02
来自: 湖南株洲

#4

帖子 recallshan » 2008-01-02 18:52

leeaman 写了:

代码: 全选

sudo apt-get update
一下看看,还有你确定本地源是那个样子写得吗?

http://www.eyea.net/bbs/index.php?mods= ... &postid=43

恩,我的源是那样写的,不过不太明白 stable main contrib 的意思
可能每张光盘的 目录都不一样
回复