Ich versuche, einen Computer unter Ubuntu 16 ohne Internet von einem anderen Computer unter Ubuntu 18 aus zu aktualisieren. Auf dem Ubuntu16-Computer habe ich Folgendes getan:
$ sudo apt-offline set ~/offline-data.sig
Dann wechselte ich mit der .sig-Datei zu meinem Ubuntu18 und versuchte, apt-offline zu verwenden, erhielt jedoch diesen Fehler beim Versuch, die Pakete herunterzuladen:
$ apt-offline get -d ./OfflineUpgrade/ offline-data.sig
Fetching APT Data
Traceback (most recent call last):
File "/usr/bin/apt-offline", line 28, in <module>
main()
File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py", line 2211, in main
args.func(args)
File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py", line 1135, in fetcher
(ItemURL, ItemFile, ItemSize, ItemChecksum) = stripper(item)
File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py", line 814, in stripper
item1 = ''.join(item[1])
IndexError: list index out of range
Meine offline-data.sig sieht folgendermaßen aus:
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/InRelease' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_InRelease 0
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/binary-amd64/Packages.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_binary-amd64_Packages 0
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/binary-i386/Packages.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_binary-i386_Packages 0
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/binary-all/Packages.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_binary-all_Packages 0
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/i18n/Translation-fr_FR.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_i18n_Translation-fr%5fFR 0
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/i18n/Translation-fr.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_i18n_Translation-fr 0
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/i18n/Translation-en.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_i18n_Translation-en 0
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/dep11/Components-amd64.yml.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_dep11_Components-amd64.yml 0
Wie kann ich das lösen?
Antwort1
Das Problem entstand also durch das unterschiedliche Schreiben der .sig-Datei durch apt-offline. In meinem Ubuntu 16, das sie geschrieben hat, endete die Datei mit mehreren Zeilen leerem Text:
'http://fr.archive.ubuntu.com/ubuntu/dists/xenial-backports/multiverse/dep11/icons-64x64.tar.xz' fr.archive.ubuntu.com_ubuntu_dists_xenial-backports_multiverse_dep11_icons-64x64.tar 0
Enable UA Infra: ESM to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo ua status
während das Ubuntu 18, das es gelesen hat, mit vollständigen Zeilen endete:
'http://at.archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/initramfs-tools-bin_0.130ubuntu3.12_amd64.deb' initramfs-tools-bin_0.130ubuntu3.12_amd64.deb 11156 MD5Sum:43c52cbf0447849d6997b454b4fc8d8d
Das Löschen der letzten Zeilen hat also geholfen.