配置本地 Apt Repo 16.04

配置本地 Apt Repo 16.04

我是 Ubuntu 新手,但已经使用 RHEL 几年了。我尝试为 16.04 设置本地存储库,运行时出现“404 Not Found”错误apt 更新从本地机器。一些背景知识,我知道此版本不再受支持,并且我在镜像存储库所在的封闭环境中工作。以下是我到目前为止所做的...

root@ubuntumirror: cat /etc/apt/mirror.list
set base_path    /apt-mirror
deb-amd64 http://<pathtorepo>/ubuntu xenial main restricted universe multiverse
deb-amd64 http://<pathtorepo>/ubuntu xenial-security main restricted universe multiverse
deb-amd64 http://<pathtorepo>/ubuntu xenial-updates main restricted universe multiverse
deb-amd64 http://<pathtorepo>/ubuntu xenial-proposed main restricted universe multiverse
deb-amd64 http://<pathtorepo>/ubuntu xenial-backports main restricted universe multiverse

由于我的声誉不足以发布那么多链接,因此修改了 repo 的路径......

apt-mirror

apt install apache2
ln -s /apt-mirror /var/www/html/ubuntu
systemctl restart apache2

然后从工作站...

root@ubuntuworkstation: cat /etc/apt/sources.list
deb [trusted=yes] http://ubuntumirror/ubuntu xenial main restricted universe multiverse
deb [trusted=yes] http://ubuntumirror/ubuntu xenial-security main restricted universe multiverse
deb [trusted=yes] http://ubuntumirror/ubuntu xenial-updates main restricted universe multiverse
deb [trusted=yes] http://ubuntumirror/ubuntu xenial-proposed main restricted universe multiverse
deb [trusted=yes] http://ubuntumirror/ubuntu xenial-backports main restricted universe multiverse

apt update经过 IGN:101 并出现几个 404 Not Found 错误,然后到达结尾,

Reading package lists... Done

然后E: Failed to fetch ... 404 Not Found列出了 sources.list 中的每个条目。它还显示

E: Some index files failed to download. They have been ignored, or old ones used instead.

我也尝试过搜索或安装单个软件包,但都失败了。有什么建议吗?我觉得我忽略了一些小问题,但到目前为止还没有任何进展。

答案1

您必须允许 Apache 遵循符号链接,请阅读以下现有线程。

https://superuser.com/questions/244245/how-do-i-get-apache-to-follow-symlinks

相关内容