无法从本地宇宙存储库下载软件包

无法从本地宇宙存储库下载软件包

尝试制作宇宙仓库的本地副本,但每次我尝试安装包时都会出现这种情况Package has no installation candiate

我按照步骤操作这里创建本地仓库。

这是我的镜像列表

############# config ##################
#
set base_path    /mnt/mirror
#
# 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 cosmic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu cosmic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu cosmic-updates main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu cosmic main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu cosmic-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu cosmic-updates main restricted universe multiverse

clean http://archive.ubuntu.com/ubuntu

我在 /var/www/html 中创建了符号链接以指向 apache2 的 repo:

ls -la /var/www/html/
total 20
drwxr-xr-x 2 root root  4096 Jan  1 11:58 .
drwxr-xr-x 3 root root  4096 Jan  1 11:27 ..
-rw-r--r-- 1 root root 10918 Jan  1 11:32 index.html
lrwxrwxrwx 1 root root    44 Jan  1 11:58 ubuntu -> /mnt/mirror/mirror/archive.ubuntu.com/ubuntu

我更新了我的 sources.list 并运行了 apt-get update

deb http://127.0.1.1/ubuntu cosmic main restricted universe multiverse
deb http://127.0.1.1/ubuntu cosmic-security main restricted universe multiverse
deb http://127.0.1.1/ubuntu cosmic-updates main restricted universe multiverse

当我在浏览器中访问该页面时,我可以看到目录,它看起来与官方 repo 相匹配。

我在这里遗漏了什么?

答案1

找到了这个邮政他使用了以下内容:

deb [arch=amd64 trusted=yes] file:///home/discoprodigy debbin/

修改了我的 sources.list:

deb [arch=amd64 trusted=yes] http://127.0.0.1/ubuntu cosmic main restricted universe multiverse

看起来添加架构和信任可以解决问题。

相关内容