AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1355896
Accepted
stackprotector
stackprotector
Asked: 2021-08-05 01:28:04 +0800 CST2021-08-05 01:28:04 +0800 CST 2021-08-05 01:28:04 +0800 CST

如何将 'main/dist-upgrader-all' 添加到 '/etc/apt/mirror.list' 以便我的 apt-mirror 下载文件以进行版本升级?

  • 772

我使用apt-mirror. 它适用于bionic和focus的包。现在,我想添加能够使用此镜像执行版本升级所需的文件。在/etc/apt/mirror.list我添加main/dist-upgrader-all到包含这些文件夹的所有更新源中。

我/etc/apt/mirror.list目前看起来像这样:

############# config ##################
#
set base_path    /mnt/usb/ubuntu_mirror
#
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch  <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############

deb-amd64 http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse main/dist-upgrader-all
deb-amd64 http://archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb-amd64 http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse main/dist-upgrader-all
deb-amd64 http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse

deb-amd64 http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse main/dist-upgrader-all
deb-amd64 http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse
deb-amd64 http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse main/dist-upgrader-all
deb-amd64 http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse

clean http://archive.ubuntu.com/ubuntu

添加 后,处理索引时main/dist-upgrader-all的执行apt-mirror抛出如下错误:

Downloading 352 index files using 20 threads...
Begin time: Wed Aug  2 12:15:38 2021
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Wed Aug  2 12:16:01 2021

Processing translation indexes: [TTTTTTTT]

Downloading 1137 translation files using 20 threads...
Begin time: Wed Aug  2 12:16:03 2021
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Wed Aug  2 12:16:26 2021

Processing DEP-11 indexes: [DDDDDDDD]

Downloading 160 dep11 files using 20 threads...
Begin time: Wed Aug  2 12:16:29 2021
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Wed Aug  2 12:16:35 2021

Processing indexes: [Papt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/bionic/main/dist-upgrader-all/binary-amd64/Packages in process_index at /usr/bin/apt-mirror line 800.
PPapt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/bionic-updates/main/dist-upgrader-all/binary-amd64/Packages in process_index at /usr/bin/apt-mirror line 800.
PPapt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/focal/main/dist-upgrader-all/binary-amd64/Packages in process_index at /usr/bin/apt-mirror line 800.
PPapt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/focal-updates/main/dist-upgrader-all/binary-amd64/Packages in process_index at /usr/bin/apt-mirror line 800.
P]

那么,我做错了什么?如何成功地将文件添加main/dist-upgrader-all到我的镜像中,以便使用此镜像的客户端可以执行版本升级?

18.04
  • 1 1 个回答
  • 410 Views

1 个回答

  • Voted
  1. Best Answer
    Andrew Lowther
    2022-06-17T16:10:58+08:002022-06-17T16:10:58+08:00

    该dist-upgrader-all目录不是 apt 存储库,但可以通过 apt-mirror 使用postmirror.sh脚本对其进行镜像。

    以下是可以添加到postmirror.sh脚本中以镜像dist-upgrader-all焦点目录的行。postmirror.sh脚本在目录中运行并$base_path/mirror使用相对路径。

    mkdir -p archive.ubuntu.com/ubuntu/dists/focal/main/dist-upgrader-all/
    rsync --recursive --times --links --hard-links --delete --delete-after rsync://archive.ubuntu.com/ubuntu/dists/focal/main/dist-upgrader-all/ archive.ubuntu.com/ubuntu/dists/focal/main/dist-upgrader-all/
    

    使用 rsync 是apt-mirror 存储库中的示例postmirror.sh脚本中显示的一种技术。它表明 rsync 可用于镜像 apt 存储库中的各种额外目录,包括、、和路径。debian-installerdist-upgrader-allinstaller-amd64installer-i386

    • 4

相关问题

  • Ubuntu 16.10 及更高版本中的 Nautilus 功能“创建链接”发生了什么变化?

  • 使用标准接口(使用 mimetype)以编程方式修改文件关联

  • 我可以从 Evince 拖放到 Thunderbird 吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve