The apt-mirror command does not work.

Asked 1 years ago, Updated 1 years ago, 361 views

The HPE physical server has Ubuntu 22.04 installed and the server is running offline.
Due to offline environment, the package cannot be installed and the package deb file must be pre-stacked with tar. (All files below)
Since downloading each of the above package files makes me faint, Ubuntu/Debian is thinking of using the apt-mirror command to mirror the package repository.
https://ja.linux-console.net/?p=1392#gsc.tab=0

I tried apt-mirror, but the following error was displayed and it didn't work.
I would appreciate it if you could let me know if you know anything.
The settings are not changed by default (increase the number of #s or remove http's h from the link as it seems to be highlighted).

US>Error Contents
root@testserver:~#apt-mirror
Downloading 162 index files using 20 threads...
Begin time:Fri Jan 606:59:43 2023
[20]...[19]...[18]...[17]...[16]...[15]...[14]...[13]...[12]...[11]...[9]...[8]...[7]...[6]...[5]...[4]...[3]...[2]...[0]...
End time:Fri Jan 607:08:36 2023

Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 507.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 507.
Processing translation indexes: TTT

Downloading 0 translation files using 0 threads...
Begin time:Fri Jan 607:08:36 2023
[0]...
End time:Fri Jan 607:08:36 2023

Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-security/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 653.
Failed to open Release file from ttp://archive.ubuntu.com/ubuntu/dists/artful-updates/Release at/usr/bin/apt-mirror line 653.
Processing DEP-11 indexes: DDD

Downloading 0 dep 11 files using 0 threads...
Begin time:Fri Jan 607:08:36 2023
[0]...
End time:Fri Jan 607:08:36 2023

apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful/main/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu/ / dists/artful/restricted/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful/universe/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful/multiverse/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror —can't open index archive.ubuntu.com/ubuntu//dists/artful-security/main/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror —can't open index archive.ubuntu.com/ubuntu//dists/artful-security/restricted/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-security/universe/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-security/multiverse/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror —can't open index archive.ubuntu.com/ubuntu//dists/artful-updates/main/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror —can't open index archive.ubuntu.com/ubuntu//dists/artful-updates/restricted/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-updates/universe/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-updates/multiverse/source/Sources in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful/main/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful/restricted/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful/universe/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful/multiverse/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-security/main/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-security/restricted/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful-security/universe/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-security/multiverse/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-updates/main/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful-updates/restricted/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dist/artful-updates/universe/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
apt-mirror: can't open index archive.ubuntu.com/ubuntu//dists/artful-updates/multiverse/binary-amd64/Packages in process_index at/usr/bin/apt-mirror line 800.
Processing indexes: SSSPPPP

0 bytes will be downloaded into archive.
Downloading 0 archive files using 0 threads...
Begin time:Fri Jan 607:08:36 2023
[0]...
End time:Fri Jan 607:08:36 2023

0 bytes in 0 files and 0 directories can be free.
Run/var/spool/apt-mirror/var/clean.sh for this purpose.

Running the Post Mirror script...
(/var/spool/apt-mirror/var/postmirror.sh)

Post Mirror script has completed.See above output for any possible errors.

Configuration
root@testserver:~#cat/etc/apt/mirror.list
############# config##################

#######set base_path/var/spool/apt-mirror

#######set mirror_path$base_path/mirror
####### set skill_path$base_path/skel
####### set var_path$base_path/var
####### set clearscript $var_path/clean.sh
####### set defaultarch
####### set postmirror_script $var_path/postmirror.sh
####### set run_postmirror0
set nthreads20
set_tilde0

############end config#############

debttp://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
debttp://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
debttp://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
# debttp://archive.ubuntu.com/ubuntu artful-proposed main restricted universe multiverse
# debttp://archive.ubuntu.com/ubuntu artful-backports main restricted universe

debug-srctp://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
debug-srctp://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
debug-srctp://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
# deb-srctp://archive.ubuntu.com/ubuntu artful-proposed main restricted universe multiverse
# deb-srctp://archive.ubuntu.com/ubuntu artful-backports main restricted universe multiverse

clean ttp://archive.ubuntu.com/ubuntu

root@testserver:~#cat/etc/apt/sources.list
####### Settp://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
####### newer versions of the distribution.
debttp://jp.archive.ubuntu.com/ubuntu jammy main restricted
####### debug-srctp://jp.archive.ubuntu.com/ubuntu jammy main restricted

####### Major bug fix updates produced after the final release of the
######## distribution.
debttp://jp.archive.ubuntu.com/ubuntu jammy-updates main restricted
####### debug-srctp://jp.archive.ubuntu.com/ubuntu jammy-updates main restricted

#######N.B.software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
######## team.Also, please note that software in universe WILL NOT receive any
######## review or updates from the Ubuntu security team.
debttp://jp.archive.ubuntu.com/ubuntu jammy universe
####### debug-srctp://jp.archive.ubuntu.com/ubuntu jammy universe
debttp://jp.archive.ubuntu.com/ubuntu jammy-updates universe
####### debug-srctp://jp.archive.ubuntu.com/ubuntu jammy-updates universe

#######N.B.software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
######## team, and may not be under a free license. Please satify yourself as
######## your rights to use the software.Also, please note that software in
######## multiverse WILL NOT receive any review or updates from the Ubuntu
######## security team.
debttp://jp.archive.ubuntu.com/ubuntu jammy multiverse
####### debug-srctp://jp.archive.ubuntu.com/ubuntu jammy multiverse
debttp://jp.archive.ubuntu.com/ubuntu jammy-updates multiverse
####### debug-srctp://jp.archive.ubuntu.com/ubuntu jammy-updates multiverse

######## N.B. software from this repository may not have been tested as ######## extensively as that contained in the main release, although it includes ######## newer versions of some applications which may provide useful features. ######## Also, please note that software in backports WILL NOT receive any review ######## or updates from the Ubuntu security team. deb ttp://jp.archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse ####### deb-src ttp://jp.archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse deb ttp://jp.archive.ubuntu.com/ubuntu jammy-security main restricted ####### deb-src ttp://jp.archive.ubuntu.com/ubuntu jammy-security main restricted deb ttp://jp.archive.ubuntu.com/ubuntu jammy-security universe#######deb-src ttp://jp.archive.ubuntu.com/ubuntu jammy-security universe deb ttp://jp.archive.ubuntu.com/ubuntu jammy-security multiverse#####deb-src ttp://jp.archive.ubuntu.com/ubuntu jammy-security multiverse
root@testserver:~#lsblk
NAME MAJ: MINRM SIZE ROTYPE MOUNTPOINTS
loop07:000 79.9M1 loop/snap/lxd/22923
loop17:10 62M 1 loop/snap/core 20/1587
loop37:30 49.6M 1 loop/snap/snapd/17883
loop47:40 63.3M 1 loop/snap/core 20/1778
loop57:50 103M 1 loop/snap/lxd/23541
sda8—00 430.1G 0 disk
tqsda18:10 1M 0 part
tqsda28:20 2G 0 part/boot
mqsda38:30 428.1G 0 part
mqubuntu --vg-ubuntu --lv253:0 0 100G 0 lvm/
sr011:01 1024M 0 rom

ubuntu apt

2023-01-11 09:33

1 Answers

As a prerequisite, Ubuntu/Debian uses a code name that corresponds to the OS version when retrieving packages.

For Ubuntu 22.04 you are using, the code name is "jammy" in /etc/apt/sources.list.

deb http://jp.archive.ubuntu.com/ubuntu jammy main restricted

Now, in the apt-mirror configuration file (/etc/apt/mirror.list), the initial setting is "artful" and corresponds to Ubuntu 17.10.It's a very old version, so I can't find the file on the mirror site, so I think it's a download error.

deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
                                     ~~~~~~

At a minimum, you will need to rewrite this to the code name of the version you are using.

rewrite examples:

deb http://archive.ubuntu.com/ubuntu jemmy main restricted universe multiverse
debug http://archive.ubuntu.com/ubuntu jemmy-security main restricted universe multiverse
debug http://archive.ubuntu.com/ubuntu jemmy-updates main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu jemmy-proposed main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu jemmy-backports main restricted universe multiverse

Note: (The OS version is different, so please reread it in a timely manner)
Set apt-mirror | Ubuntu 20.04 Try setting up an archive mirror locally


2023-01-11 09:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.