UserJB
August 9th, 2018, 02:28 PM
I'm trying to create an offline repository for ubuntu version 16.04. I followed the instructions here https://www.tecmint.com/setup-local-repositories-in-ubuntu/ The title of that web-page is: "Setup Local Repositories with ‘apt-mirror’ in Ubuntu and Debian Systems". I only deviated from the instructions at the end: it explains how to configure clients to use the local repository via ftp, and I want clients to use the repository directly from the local filesystem. I think this should be an easy thing to do, but I'm stuck.
Here is what I've done so far: I downloaded the entire repo with apt-mirror. The local directory is: /usr/local/repo. I added this line to /etc/apt/sources.list:
deb file:/usr/local/repo/mirror/archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
I commented out all other lines in /etc/apt/sources.list. I then ran "apt-get update" as root, and I received a screenful of successful output, and I also received some errors and warning messages:
File not found - /usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages (2: No such file or directory)
Reading package lists... Done
E: Failed to fetch file:/usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages File not found - /usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages (2: No such file or directory)
E: Some index files failed to download. They have been ignored, or old ones used instead.
The file named Packages does not exist, and in fact, this directory "/usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386" does not exist.
What am I doing wrong? Did I add the incorrect directory name to /etc/apt/sources.list? Or should I have run another command? Possibly dpkg-scanpackages? Why is it looking for i386 packages when I'm on a 64-bit machine?
Here is what I've done so far: I downloaded the entire repo with apt-mirror. The local directory is: /usr/local/repo. I added this line to /etc/apt/sources.list:
deb file:/usr/local/repo/mirror/archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
I commented out all other lines in /etc/apt/sources.list. I then ran "apt-get update" as root, and I received a screenful of successful output, and I also received some errors and warning messages:
File not found - /usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages (2: No such file or directory)
Reading package lists... Done
E: Failed to fetch file:/usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages File not found - /usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages (2: No such file or directory)
E: Some index files failed to download. They have been ignored, or old ones used instead.
The file named Packages does not exist, and in fact, this directory "/usr/local/repo/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386" does not exist.
What am I doing wrong? Did I add the incorrect directory name to /etc/apt/sources.list? Or should I have run another command? Possibly dpkg-scanpackages? Why is it looking for i386 packages when I'm on a 64-bit machine?