0

I successfully created a local repository on a 20.04 server VM in a VMware ESXi 6.7 environment using apt-mirror, however I'm not able to perform installs or updates from that repository. Multiple errors indicate 404 not found which is appropriate for the file icons-64x64@2.rar because it wasn't found in the repository in the expected location.

When attempting to install packages, the message "E: Package 'packagename' has no installation candidate" is returned. The screenshot was taken from a 20.04 desktop VM with address 192.168.46.129.The repository host name is "repo" which resolves to address 192.168.46.130
This configuration has been tested multiple times in multiple environments with the same results. For example, a 20.04 server VM from a fresh snapshot was used and the results were the same as the original attempt. A second VMware environment was used to host a 20.04 server and 20.04 desktop VMs and the results were the same.

In both environments, neither server or desktop VMs were able to successfully use the local repository. The server wasn't able to utilize the repository that it was hosting locally.

Attached is a screenshot that shows the results of an update as well as the sources.list and a web browser pointing to the repository contents.
If anybody has recommendations for getting the local repository working, I'd be most grateful.

Click here for image

4
  • Thanks for the reply, I agree, it doesn't look right. I'll make corrections and let you know if that solves the problem. And thanks for the pointer on copying text. This is my first post, thanks for your patience! – Acme Computer Aug 11 '20 at 23:42
  • I had trouble getting it to work with http. I switched to using ssh and it's worked great since then. For accessing from the same machine just use file:// – Organic Marble Aug 12 '20 at 3:16
  • to get rid of the paths before the FQDN I created a symlink to the folder where the repo is located and called it ubuntu-archive repo/ubuntu-archive works in a web browser and enables wget to pull files from the repository However, performing apt installs results in: $ sudo apt install net-tools Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package net-tools attempts to update fail with several errors including a file "icons-64x64@2.tar" that doesn't exist in the repository I created – Acme Computer Aug 12 '20 at 3:29
  • Thanks @OrganicMarble. I know http, https and ftp can be used to access repositories but I wasn't aware that ssh could be used. How did you configure it? – Acme Computer Aug 12 '20 at 11:52
0

A problem exists with the version of apt-mirror that ships with Ubuntu 20.04.
Per the following github issues, it causes apt updates to fail when local repositories are used.
https://github.com/apt-mirror/apt-mirror/issues/102
https://github.com/apt-mirror/apt-mirror/issues/118

Here's a link to the updated apt-mirror package I used to solve this problem.
https://github.com/Stifler6996/apt-mirror

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.