我是Ubuntu的新手,但我已经和RHEL合作了几年。我试图为16.04设置一个本地回购程序,当我从本地机器运行apt更新时,会得到"404 Not“错误。一些背景情况下,我知道这个版本不再受支持了,我在一个封闭的环境中工作,在这里我正在镜像的存储库是存在的。以下是我迄今所做的.
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因为我没有足够的声誉来发布那么多的链接.
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 multiverseapt update通过IGN:101,有两个404没有找到错误,然后一直到最后,
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.我也尝试过搜索或安装单独的软件包,它们都失败了。有什么建议吗?我觉得自己好像忽略了一些小东西,但到目前为止还没有任何运气。
发布于 2018-11-05 18:53:22
您必须允许Apache遵循Symlink,读取以下现有线程。
https://superuser.com/questions/244245/how-do-i-get-apache-to-follow-symlinks
https://askubuntu.com/questions/1090294
复制相似问题