我遵循了从https://help.ubuntu.com/community/Debmirror中设置反镜像的指南。我更改了文件到外部驱动器,并将其设置为下载焦点和多毛。Deb镜像在没有错误的情况下完成,但是当我试图将计算机指向它时,我会得到一个错误,但是当我尝试apt-get更新时,会得到一个错误。
错误消息:存储库'http://192.168.1.42/ubuntu hirsute发行版‘没有从这样一个存储库中释放的file.Updating无法安全执行,因此由default.See apt安全(8)命令页禁用,用于存储库创建和用户配置详细信息。
我哪里出问题了?
文件下载到这里
/mnt/USBHDD/mirrors/ubuntu_repository
├── dists
│ ├── focal
│ ├── focal-security
│ ├── focal-updates
│ ├── hirsute
│ ├── hirsute-security
│ └── hirsute-updates
├── pool
│ ├── main
│ ├── multiverse
│ ├── restricted
│ └── universe
└── project
└── trace对于Apache来说,链接到/var/www/ubuntu的树看起来和上面一样。
这是我的sh脚本
#!/bin/bash
# Arch= -a # Architecture. For Ubuntu can be i386, powerpc or amd64.
# sparc, only starts in dapper, it is only the later models of sparc.
# For multiple architecture, use ",". like "i386,amd64"
arch=amd64,i386
# Minimum Ubuntu system requires main, restricted
# Section= -s # Section (One of the following - main/restricted/universe/multiverse).
# You can add extra file with $Section/debian-installer. ex: main/debian-installer,universe/debian-installer,multiverse/debian-installer,restricted/debian-installer
section=main,restricted,universe,multiverse
# Release= -d # Release of the system (, focal ), and the -updates and -security ( -backports can be added if desired)
# List of updated releases in: https://wiki.ubuntu.com/Releases
# List of sort codenames used: http://archive.ubuntu.com/ubuntu/dists/
release=focal,focal-security,focal-updates,hirsute,hirsute-security,hirsute-updates
# Server= -h # Server name, minus the protocol and the path at the end
# CHANGE "*" to equal the mirror you want to create your mirror from. au. in Australia ca. in Canada.
# This can be found in your own /etc/apt/sources.list file, assuming you have Ubuntu installed.
server=archive.ubuntu.com
# Dir= -r # Path from the main server, so http://my.web.server/$dir, Server dependant
inPath=/ubuntu
# Proto= --method= # Protocol to use for transfer (http, ftp, hftp, rsync)
# Choose one - http is most usual the service, and the service must be available on the server you point at.
# For some "rsync" may be faster.
proto=rsync
# Outpath= # Directory to store the mirror in
# Make this a full path to where you want to mirror the material.
outPath=/mnt/USBHDD/mirrors/ubuntu_repository
# The --nosource option only downloads debs and not deb-src's
# The --progress option shows files as they are downloaded
# --source \ in the place of --no-source \ if you want sources also.
# --nocleanup Do not clean up the local mirror after mirroring is complete. Use this option to keep older repository
# Start script
debmirror -a $arch \
--no-source \
--check-gpg \
--checksums \
-s $section \
-h $server \
-d $release \
-r $inPath \发布于 2021-11-28 04:33:35
经过多次网上冲浪,我找到了我问题的答案。问题在于Apache的默认位置。
指南列出了/var/www/ubuntu
应该是/var/www/html/ubuntu
做了那个改变后,我的镜子起作用了。
拼图中缺失的部分位于:创建了apt镜像,但无法从localhost/ubuntu浏览到它.道具到Arronical。
https://askubuntu.com/questions/1376260
复制相似问题