我的 apt-mirror 有问题。
我打算为我的公司建立一个内部 Ubuntu 镜像。
我的公司使用 Squid 代理:内部 IP 10.###.###.5:3128 我们的代理不需要用户/密码。
我正在运行Ubuntu。
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
Linux ber-app-29v 6.5.0-21-generi
我的apt-get install
工作是添加evn
变量
export http_proxy="http://10.###,###.5:3128"
export https_proxy="https://10.###,###.5:3128"
export ftp_proxy="http://10.###,###.5:3128"
所以我可以sudo apt update
。我一直在寻找解决方案,并找到了此页面:https://askubuntu.com/questions/1443194/apt-mirror-error/1448476
因此将其添加到文件中。
这/ets/apt/mirror.list
{ ############# config ##################
#
set base_path /usr/share/nginx/html/repo/Ubuntu
### More commented values
# set run_postmirror 0
set nthreads 20
set _tilde 0
# to access to repo list at http://archive.ubuntu.com/ubuntu/
set no_check_certificate 1
# Jammy 22.04
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe
#Focal 20.04
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe
clean http://archive.ubuntu.com/ubuntu
代理文件/ets/apt/apt.conf.d/90curtin-aptproxy
# Proxysetting for apt
Acquire::http::Proxy "http://10.###.###.5:3128/";
Acquire::https::Proxy "https://10.###.###.5:3128/";
Acquire::tcp::Proxy "tcp://10.###.###.5:3128/";
我已经用两种卷曲进行了测试:
url -v --insecure http://archive.ubuntu.com/ubuntu/dists/jammy/Release 1>/dev/null
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Last-Modified: Thu, 21 Apr 2022 17:16:39 GMT
< Content-Length: 269219
< Date: Thu, 07 Mar 2024 13:10:40 GMT
wget http://archive.ubuntu.com/ubuntu/dists/xenial/Release
--2024-03-07 12:58:17-- http://archive.ubuntu.com/ubuntu/dists/xenial/Release Connecting to 10.246.214.5:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 245864 (240K)
Saving to: ‘Release.1’
2024-03-07 12:58:18 (176 MB/s) - ‘Release.1’ saved [245864/245864]
apt-get
它本身也在发挥作用apt update
。
sudo apt-get install mc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libssh2-1 mc-data unzip
Suggested packages:
...
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
但随着这一切的apt-mirror
破裂。
sudo apt-mirror
Downloading 304 index files using 20 threads...
Begin time: Thu Mar 7 13:44:42 2024
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Thu Mar 7 13:44:42 2024
Failed to open Release file from http://archive.ubuntu.com/ubuntu/dists/jammy/Release at /usr/bin/apt-mirror line 507.
Failed to open Release file from http://archive.ubuntu.com/ubuntu/dists/jammy/Release at /usr/bin/apt-mirror line 507.
Failed to open Release file from http://archive.ubuntu.com/ubuntu/dists/jammy/Release at /usr/bin/apt-mirror line 507.
Failed to open Release file from http://archive.ubuntu.com/ubuntu/dists/jammy/Release at /usr/bin/apt-mirror line 507.
...
Also for line 653, 800
apt-mirror 线 507 和 653
unless ( open STREAM, "<$release_path" )
{
warn( "Failed to open Release file from " . $release_uri );
return;
}
apt-mirror line 800
unless ( open STREAM, "<$path/$index" )
{
warn("apt-mirror: can't open index $path/$index in process_index");
return;
}
那么还有什么是错误的呢?我已经没有办法检查了。所有部分都按预期工作,但不是整体(apt-mirror)。
我还缺少其他实用程序或设置吗?