尝试使用 16.04 设置本地存储库(主机和客户端都是 16.04 LTS),但在客户端apt-mirror
运行时遇到问题,其中包括由于缺少发布文件而导致的身份验证问题。sudo apt-get update
我已经关注本指南设置本地存储库。
主机端:
/etc/apt/mirror.list
:
############# config ##################
#
set base_path /repo
#
# 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 http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
clean http://archive.ubuntu.com/ubuntu
对于 apache 部分,我已经创建了链接sudo ln -s /repo/mirror/archive.ubuntu.com/ubuntu/ ubuntu
,因此与指南相比没有变化。
客户端:
在客户端我只更改为http://archive.ubuntu.com/ubuntu/
,例如http://10.0.0.125/ubuntu
/etc/apt/sources.list
deb http://10.0.0.125/ubuntu/ xenial main restricted
deb http://10.0.0.125/ubuntu/ xenial-updates main restricted
deb http://10.0.0.125/ubuntu/ xenial universe
deb http://10.0.0.125/ubuntu/ xenial-updates universe
deb http://10.0.0.125/ubuntu/ xenial multiverse
deb http://10.0.0.125/ubuntu/ xenial-updates multiverse
运行时sudo apt-get update
我得到以下信息;
Ign:1 http://10.0.0.125/ubuntu xenial InRelease
Ign:2 http://10.0.0.125/ubuntu xenial-updates InRelease
Ign:3 http://10.0.0.125/ubuntu xenial Release
Ign:4 http://10.0.0.125/ubuntu xenial-updates Release
Ign:5 http://10.0.0.125/ubuntu xenial/main amd64 Packages
Ign:6 http://10.0.0.125/ubuntu xenial/main i386 Packages
Ign:7 http://10.0.0.125/ubuntu xenial/main all Packages
Ign:8 http://10.0.0.125/ubuntu xenial/main Translation-en
Ign:9 http://10.0.0.125/ubuntu xenial/restricted amd64 Packages
Ign:10 http://10.0.0.125/ubuntu xenial/restricted i386 Packages
Ign:11 http://10.0.0.125/ubuntu xenial/restricted all Packages
Ign:12 http://10.0.0.125/ubuntu xenial/restricted Translation-en
Ign:13 http://10.0.0.125/ubuntu xenial/universe amd64 Packages
Ign:14 http://10.0.0.125/ubuntu xenial/universe i386 Packages
Ign:15 http://10.0.0.125/ubuntu xenial/universe all Packages
Ign:16 http://10.0.0.125/ubuntu xenial/universe Translation-en
Ign:17 http://10.0.0.125/ubuntu xenial/multiverse amd64 Packages
Ign:18 http://10.0.0.125/ubuntu xenial/multiverse i386 Packages
Ign:19 http://10.0.0.125/ubuntu xenial/multiverse all Packages
Ign:20 http://10.0.0.125/ubuntu xenial/multiverse Translation-en
Ign:21 http://10.0.0.125/ubuntu xenial-updates/main amd64 Packages
Ign:22 http://10.0.0.125/ubuntu xenial-updates/main i386 Packages
Ign:23 http://10.0.0.125/ubuntu xenial-updates/main all Packages
Ign:24 http://10.0.0.125/ubuntu xenial-updates/main Translation-en
Ign:25 http://10.0.0.125/ubuntu xenial-updates/restricted amd64 Packages
Ign:26 http://10.0.0.125/ubuntu xenial-updates/restricted i386 Packages
Ign:27 http://10.0.0.125/ubuntu xenial-updates/restricted all Packages
Ign:28 http://10.0.0.125/ubuntu xenial-updates/restricted Translation-en
Ign:29 http://10.0.0.125/ubuntu xenial-updates/universe amd64 Packages
Ign:30 http://10.0.0.125/ubuntu xenial-updates/universe i386 Packages
Ign:31 http://10.0.0.125/ubuntu xenial-updates/universe all Packages
Ign:32 http://10.0.0.125/ubuntu xenial-updates/universe Translation-en
Ign:33 http://10.0.0.125/ubuntu xenial-updates/multiverse amd64 Packages
Ign:34 http://10.0.0.125/ubuntu xenial-updates/multiverse i386 Packages
Ign:35 http://10.0.0.125/ubuntu xenial-updates/multiverse all Packages
Ign:36 http://10.0.0.125/ubuntu xenial-updates/multiverse Translation-en
Ign:5 http://10.0.0.125/ubuntu xenial/main amd64 Packages
Ign:6 http://10.0.0.125/ubuntu xenial/main i386 Packages
Ign:7 http://10.0.0.125/ubuntu xenial/main all Packages
Ign:8 http://10.0.0.125/ubuntu xenial/main Translation-en
Ign:9 http://10.0.0.125/ubuntu xenial/restricted amd64 Packages
Ign:10 http://10.0.0.125/ubuntu xenial/restricted i386 Packages
Ign:11 http://10.0.0.125/ubuntu xenial/restricted all Packages
Ign:12 http://10.0.0.125/ubuntu xenial/restricted Translation-en
Ign:13 http://10.0.0.125/ubuntu xenial/universe amd64 Packages
Ign:14 http://10.0.0.125/ubuntu xenial/universe i386 Packages
Ign:15 http://10.0.0.125/ubuntu xenial/universe all Packages
Ign:16 http://10.0.0.125/ubuntu xenial/universe Translation-en
Ign:17 http://10.0.0.125/ubuntu xenial/multiverse amd64 Packages
Ign:18 http://10.0.0.125/ubuntu xenial/multiverse i386 Packages
Ign:19 http://10.0.0.125/ubuntu xenial/multiverse all Packages
Ign:20 http://10.0.0.125/ubuntu xenial/multiverse Translation-en
Ign:21 http://10.0.0.125/ubuntu xenial-updates/main amd64 Packages
Ign:22 http://10.0.0.125/ubuntu xenial-updates/main i386 Packages
Ign:23 http://10.0.0.125/ubuntu xenial-updates/main all Packages
Ign:24 http://10.0.0.125/ubuntu xenial-updates/main Translation-en
Ign:25 http://10.0.0.125/ubuntu xenial-updates/restricted amd64 Packages
Ign:26 http://10.0.0.125/ubuntu xenial-updates/restricted i386 Packages
Ign:27 http://10.0.0.125/ubuntu xenial-updates/restricted all Packages
Ign:28 http://10.0.0.125/ubuntu xenial-updates/restricted Translation-en
Ign:29 http://10.0.0.125/ubuntu xenial-updates/universe amd64 Packages
Ign:30 http://10.0.0.125/ubuntu xenial-updates/universe i386 Packages
Ign:31 http://10.0.0.125/ubuntu xenial-updates/universe all Packages
Ign:32 http://10.0.0.125/ubuntu xenial-updates/universe Translation-en
Ign:33 http://10.0.0.125/ubuntu xenial-updates/multiverse amd64 Packages
Ign:34 http://10.0.0.125/ubuntu xenial-updates/multiverse i386 Packages
Ign:35 http://10.0.0.125/ubuntu xenial-updates/multiverse all Packages
Ign:36 http://10.0.0.125/ubuntu xenial-updates/multiverse Translation-en
Ign:5 http://10.0.0.125/ubuntu xenial/main amd64 Packages
Ign:6 http://10.0.0.125/ubuntu xenial/main i386 Packages
Ign:7 http://10.0.0.125/ubuntu xenial/main all Packages
Ign:8 http://10.0.0.125/ubuntu xenial/main Translation-en
Ign:9 http://10.0.0.125/ubuntu xenial/restricted amd64 Packages
Ign:10 http://10.0.0.125/ubuntu xenial/restricted i386 Packages
Ign:11 http://10.0.0.125/ubuntu xenial/restricted all Packages
Ign:12 http://10.0.0.125/ubuntu xenial/restricted Translation-en
Ign:13 http://10.0.0.125/ubuntu xenial/universe amd64 Packages
Ign:14 http://10.0.0.125/ubuntu xenial/universe i386 Packages
Ign:15 http://10.0.0.125/ubuntu xenial/universe all Packages
Ign:16 http://10.0.0.125/ubuntu xenial/universe Translation-en
Ign:17 http://10.0.0.125/ubuntu xenial/multiverse amd64 Packages
Ign:18 http://10.0.0.125/ubuntu xenial/multiverse i386 Packages
Ign:19 http://10.0.0.125/ubuntu xenial/multiverse all Packages
Ign:20 http://10.0.0.125/ubuntu xenial/multiverse Translation-en
Ign:21 http://10.0.0.125/ubuntu xenial-updates/main amd64 Packages
Ign:22 http://10.0.0.125/ubuntu xenial-updates/main i386 Packages
Ign:23 http://10.0.0.125/ubuntu xenial-updates/main all Packages
Ign:24 http://10.0.0.125/ubuntu xenial-updates/main Translation-en
Ign:25 http://10.0.0.125/ubuntu xenial-updates/restricted amd64 Packages
Ign:26 http://10.0.0.125/ubuntu xenial-updates/restricted i386 Packages
Ign:27 http://10.0.0.125/ubuntu xenial-updates/restricted all Packages
Ign:28 http://10.0.0.125/ubuntu xenial-updates/restricted Translation-en
Ign:29 http://10.0.0.125/ubuntu xenial-updates/universe amd64 Packages
Ign:30 http://10.0.0.125/ubuntu xenial-updates/universe i386 Packages
Ign:31 http://10.0.0.125/ubuntu xenial-updates/universe all Packages
Ign:32 http://10.0.0.125/ubuntu xenial-updates/universe Translation-en
Ign:33 http://10.0.0.125/ubuntu xenial-updates/multiverse amd64 Packages
Ign:34 http://10.0.0.125/ubuntu xenial-updates/multiverse i386 Packages
Ign:35 http://10.0.0.125/ubuntu xenial-updates/multiverse all Packages
Ign:36 http://10.0.0.125/ubuntu xenial-updates/multiverse Translation-en
Ign:5 http://10.0.0.125/ubuntu xenial/main amd64 Packages
Ign:6 http://10.0.0.125/ubuntu xenial/main i386 Packages
Ign:7 http://10.0.0.125/ubuntu xenial/main all Packages
Ign:8 http://10.0.0.125/ubuntu xenial/main Translation-en
Ign:9 http://10.0.0.125/ubuntu xenial/restricted amd64 Packages
Ign:10 http://10.0.0.125/ubuntu xenial/restricted i386 Packages
Ign:11 http://10.0.0.125/ubuntu xenial/restricted all Packages
Ign:12 http://10.0.0.125/ubuntu xenial/restricted Translation-en
Ign:13 http://10.0.0.125/ubuntu xenial/universe amd64 Packages
Ign:14 http://10.0.0.125/ubuntu xenial/universe i386 Packages
Ign:15 http://10.0.0.125/ubuntu xenial/universe all Packages
Ign:16 http://10.0.0.125/ubuntu xenial/universe Translation-en
Ign:17 http://10.0.0.125/ubuntu xenial/multiverse amd64 Packages
Ign:18 http://10.0.0.125/ubuntu xenial/multiverse i386 Packages
Ign:19 http://10.0.0.125/ubuntu xenial/multiverse all Packages
Ign:20 http://10.0.0.125/ubuntu xenial/multiverse Translation-en
Ign:21 http://10.0.0.125/ubuntu xenial-updates/main amd64 Packages
Ign:22 http://10.0.0.125/ubuntu xenial-updates/main i386 Packages
Ign:23 http://10.0.0.125/ubuntu xenial-updates/main all Packages
Ign:24 http://10.0.0.125/ubuntu xenial-updates/main Translation-en
Ign:25 http://10.0.0.125/ubuntu xenial-updates/restricted amd64 Packages
Ign:26 http://10.0.0.125/ubuntu xenial-updates/restricted i386 Packages
Ign:27 http://10.0.0.125/ubuntu xenial-updates/restricted all Packages
Ign:28 http://10.0.0.125/ubuntu xenial-updates/restricted Translation-en
Ign:29 http://10.0.0.125/ubuntu xenial-updates/universe amd64 Packages
Ign:30 http://10.0.0.125/ubuntu xenial-updates/universe i386 Packages
Ign:31 http://10.0.0.125/ubuntu xenial-updates/universe all Packages
Ign:32 http://10.0.0.125/ubuntu xenial-updates/universe Translation-en
Ign:33 http://10.0.0.125/ubuntu xenial-updates/multiverse amd64 Packages
Ign:34 http://10.0.0.125/ubuntu xenial-updates/multiverse i386 Packages
Ign:35 http://10.0.0.125/ubuntu xenial-updates/multiverse all Packages
Ign:36 http://10.0.0.125/ubuntu xenial-updates/multiverse Translation-en
Ign:5 http://10.0.0.125/ubuntu xenial/main amd64 Packages
Ign:6 http://10.0.0.125/ubuntu xenial/main i386 Packages
Ign:7 http://10.0.0.125/ubuntu xenial/main all Packages
Ign:8 http://10.0.0.125/ubuntu xenial/main Translation-en
Ign:9 http://10.0.0.125/ubuntu xenial/restricted amd64 Packages
Ign:10 http://10.0.0.125/ubuntu xenial/restricted i386 Packages
Ign:11 http://10.0.0.125/ubuntu xenial/restricted all Packages
Ign:12 http://10.0.0.125/ubuntu xenial/restricted Translation-en
Ign:13 http://10.0.0.125/ubuntu xenial/universe amd64 Packages
Ign:14 http://10.0.0.125/ubuntu xenial/universe i386 Packages
Ign:15 http://10.0.0.125/ubuntu xenial/universe all Packages
Ign:16 http://10.0.0.125/ubuntu xenial/universe Translation-en
Ign:17 http://10.0.0.125/ubuntu xenial/multiverse amd64 Packages
Ign:18 http://10.0.0.125/ubuntu xenial/multiverse i386 Packages
Ign:19 http://10.0.0.125/ubuntu xenial/multiverse all Packages
Ign:20 http://10.0.0.125/ubuntu xenial/multiverse Translation-en
Ign:21 http://10.0.0.125/ubuntu xenial-updates/main amd64 Packages
Ign:22 http://10.0.0.125/ubuntu xenial-updates/main i386 Packages
Ign:23 http://10.0.0.125/ubuntu xenial-updates/main all Packages
Ign:24 http://10.0.0.125/ubuntu xenial-updates/main Translation-en
Ign:25 http://10.0.0.125/ubuntu xenial-updates/restricted amd64 Packages
Ign:26 http://10.0.0.125/ubuntu xenial-updates/restricted i386 Packages
Ign:27 http://10.0.0.125/ubuntu xenial-updates/restricted all Packages
Ign:28 http://10.0.0.125/ubuntu xenial-updates/restricted Translation-en
Ign:29 http://10.0.0.125/ubuntu xenial-updates/universe amd64 Packages
Ign:30 http://10.0.0.125/ubuntu xenial-updates/universe i386 Packages
Ign:31 http://10.0.0.125/ubuntu xenial-updates/universe all Packages
Ign:32 http://10.0.0.125/ubuntu xenial-updates/universe Translation-en
Ign:33 http://10.0.0.125/ubuntu xenial-updates/multiverse amd64 Packages
Ign:34 http://10.0.0.125/ubuntu xenial-updates/multiverse i386 Packages
Ign:35 http://10.0.0.125/ubuntu xenial-updates/multiverse all Packages
Ign:36 http://10.0.0.125/ubuntu xenial-updates/multiverse Translation-en
Err:5 http://10.0.0.125/ubuntu xenial/main amd64 Packages
404 Not Found
Ign:6 http://10.0.0.125/ubuntu xenial/main i386 Packages
Ign:7 http://10.0.0.125/ubuntu xenial/main all Packages
Ign:8 http://10.0.0.125/ubuntu xenial/main Translation-en
Ign:9 http://10.0.0.125/ubuntu xenial/restricted amd64 Packages
Ign:10 http://10.0.0.125/ubuntu xenial/restricted i386 Packages
Ign:11 http://10.0.0.125/ubuntu xenial/restricted all Packages
Ign:12 http://10.0.0.125/ubuntu xenial/restricted Translation-en
Ign:13 http://10.0.0.125/ubuntu xenial/universe amd64 Packages
Ign:14 http://10.0.0.125/ubuntu xenial/universe i386 Packages
Ign:15 http://10.0.0.125/ubuntu xenial/universe all Packages
Err:21 http://10.0.0.125/ubuntu xenial-updates/main amd64 Packages
404 Not Found
Ign:22 http://10.0.0.125/ubuntu xenial-updates/main i386 Packages
Ign:23 http://10.0.0.125/ubuntu xenial-updates/main all Packages
Ign:24 http://10.0.0.125/ubuntu xenial-updates/main Translation-en
Ign:25 http://10.0.0.125/ubuntu xenial-updates/restricted amd64 Packages
Ign:26 http://10.0.0.125/ubuntu xenial-updates/restricted i386 Packages
Ign:27 http://10.0.0.125/ubuntu xenial-updates/restricted all Packages
Ign:28 http://10.0.0.125/ubuntu xenial-updates/restricted Translation-en
Ign:29 http://10.0.0.125/ubuntu xenial-updates/universe amd64 Packages
Ign:30 http://10.0.0.125/ubuntu xenial-updates/universe i386 Packages
Ign:31 http://10.0.0.125/ubuntu xenial-updates/universe all Packages
Reading package lists... Done
W: The repository 'http://10.0.0.125/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://10.0.0.125/ubuntu xenial-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://10.0.0.125/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://10.0.0.125/ubuntu/dists/xenial-updates/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
有什么建议可以解决这个问题吗?我看过一些关于apt-mirror
和的帖子16.04
,但似乎遇到类似问题的其他人都用对我不起作用的解决方案解决了他们的问题。
答案1
正如问题评论中提到的,这个问题通过将 i386 软件包添加到本地存储库来解决。/etc/apt/mirror.list:
在主机端进行了以下微小更改(如果我没记错的话,必须额外下载大约 40GB 的软件包):
############# config ##################
#
set base_path /repo
#
# 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 xenial main restricted universe multiverse
deb-amd64 http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-amd64 http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-i386 http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-i386 http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-i386 http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
clean http://archive.ubuntu.com/ubuntu
无法解释为什么它有效,但它确实有效,并且解决了我的问题。虽然很愚蠢。