ubuntu本地源搭建

centos系统的yum源搭建起来很方便,但是ubuntu不太熟悉,遇到了问题。

需求:
从阿里使用apt-mirror将镜像同步下来,但是由于比较大,删除了部分包,减小到 12G 左右,使用如下命令重新建立索引,
dpkg-scanpackages /var/spool/apt-mirror/mirror/mirrors.aliyun.com.trusty/ubunutu/ /dev/null | gzip > /var/spool/apt-mirror/mirror/mirrors.aliyun.com.trusty/ubunutu/Packages.gz

更改配置
deb file:/var debs/

apt-get update时会有如下报错

# apt-get update
Ign file: ubunutu/ InRelease
Ign file: ubunutu/ Release.gpg
Ign file: ubunutu/ Release
Err file: ubunutu/ Packages
  File not found
Ign file: ubunutu/ Translation-en
W: Failed to fetch file:/var/spool/apt-mirror/mirror/mirrors.aliyun.com.trusty/ubunutu/Packages  File not found

E: Some index files failed to download. They have been ignored, or old ones used instead.

谁可以提供更详细的教程?

进展:
使用file格式的sources.list已经可以使用了,可是使用http格式的如下,还是不能使用
deb http://mirrors.com/debs trusty main restricted universe multiverse

mirrors.com已经解析到本机了,trusty main restricted universe multiverse这一串该怎么写?

阅读 4.1k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题