开发者社区> 问答> 正文

Ubuntu20.04 apt-mirror 配置本地源报错

公司由于内网环境与公网不通,准备配置一套Ubuntu本地源,其他server通过本地源安装及更新软件 配置过程中,同步阿里源没有问题,但是其他server访问这台本地源时就报错,相关信息如下: 源mirror.list:

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

客户机source.list:

deb http://10.157.137.152/ubuntu/ focal main restricted universe multiverse
deb http://10.157.137.152/ubuntu/ focal-security main restricted universe multiverse
deb http://10.157.137.152/ubuntu/ focal-updates main restricted universe multiverse

客户机执行apt update时报错如下: 图片.png 经比对 http://mirrors.aliyun.com/ubuntu/dists/focal/main/cnf/确实没有同步到本地来,但是同步也没有报错

展开
收起
1528028779784264 2020-06-10 15:07:14 5128 0
3 条回答
写回答
取消 提交回答
  • 这个错误是由于apt-mirror这个脚本里面没有把cnf 这个目录的URL添加到下载队列中引起的, 你可以自己更改apt-mirror 把cnf这个加到下载目录中, 或者自己手动在你的本地源的目录中生成这个目录,然后手动把文件下载到里面。 但是有可能会因为下载日期不同,造成下载的文件和release中记录的本目录文件的大小不一样,引起校验文件长度错误。

         **   add_url_to_download( $url . $_ . "/cnf/Commands-" . $arch . ".xz" )**;
    
    2020-08-14 15:12:02
    赞同 1 展开评论 打赏
  • 应该是focal源目录结构变了,apt-mirror没有相应更新。怎么才能更新过来?

    2020-07-30 20:24:32
    赞同 展开评论 打赏
  • 精于基础,广于工具,熟于业务。

    把报错的IP配置到host文件里面试试

    2020-06-10 17:01:26
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载