-
Notifications
You must be signed in to change notification settings - Fork 390
opam update, Could not update repository "default": Failed to extract archive #5484
Copy link
Copy link
Open
Labels
Milestone
Description
Hi, an 'opam update' gives an error 2. Any ideas on how to investigate this?
teg@hilbert:~$ opam update
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] Could not update repository "default": Failed to extract archive /tmp/opam-17061-2b9851/index.tar.gz:
"/usr/bin/tar xfz /tmp/opam-17061-2b9851/index.tar.gz -C /tmp/opam-17061-edec5a/default.new" exited with
code 2
teg@hilbert:~$ opam update --debug-level=10
00:00.036 FILE(config) Read ~/.opam/config in 0.000s
00:00.036 CLI Parsing CLI version 2.1
00:00.036 GSTATE LOAD-GLOBAL-STATE @ /home/teg/.opam
00:00.037 SYSTEM LOCK /home/teg/.opam/lock (none => read)
00:00.037 SYSTEM LOCK /home/teg/.opam/config.lock (none => write)
00:00.037 FILE(config) Read ~/.opam/config in 0.000s
00:00.037 CLIENT UPDATE
00:00.037 RSTATE LOAD-REPOSITORY-STATE @ /home/teg/.opam
00:00.037 FILE(repos-config) Read ~/.opam/repo/repos-config in 0.000s
00:00.038 SYSTEM LOCK /home/teg/.opam/repo/state-11ABC690.cache (none => read)
00:00.164 CACHE(repository) Loaded /home/teg/.opam/repo/state-11ABC690.cache in 0.126s
00:00.164 SYSTEM LOCK /home/teg/.opam/repo/state-11ABC690.cache (read => none)
00:00.164 RSTATE Cache found
00:00.164 STATE LOAD-SWITCH-STATE @ 5.0.0
00:00.164 FILE(switch-config) Read ~/.opam/5.0.0/.opam-switch/switch-config in 0.000s
00:00.164 FILE(switch-state) Read ~/.opam/5.0.0/.opam-switch/switch-state in 0.000s
00:00.164 SYSTEM LOCK /home/teg/.opam/5.0.0/.opam-switch/packages/cache (none => read)
00:00.164 CACHE(installed) Loaded /home/teg/.opam/5.0.0/.opam-switch/packages/cache in 0.000s
00:00.164 SYSTEM LOCK /home/teg/.opam/5.0.0/.opam-switch/packages/cache (read => none)
00:00.699 FILE(.config) Read ~/.opam/5.0.0/.opam-switch/config/ocaml.config in 0.000s
00:00.699 STATE Switch state loaded in 0.535s
00:00.699 SYSTEM LOCK /home/teg/.opam/repo/lock (none => write)
00:00.699 SYSTEM LOCK /home/teg/.opam/repo/lock (none => write)
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
00:00.703 PARALLEL Iterate over 1 task(s) with 3 process(es)
00:00.703 PARALLEL Starting job 0 (worker 1/3): 0
00:00.703 SYSTEM mkdir /tmp/opam-17122-e3a56e
00:06.658 REPOSITORY update default from https://opam.ocaml.org
00:06.658 CURL pull-repo-update
00:06.658 SYSTEM mkdir /tmp/opam-17122-e3a56e/default.new
00:06.658 SYSTEM mkdir /tmp/opam-17122-46fd0e
00:06.659 PARALLEL Next task in job 0: /usr/bin/curl --write-out %{http_code}\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /tmp/opam-17122-46fd0e/index.tar.gz.part -- https://opam.ocaml.org/index.tar.gz
Processing 1/1: [default: http]
00:14.034 PARALLEL Collected task for job 0 (ret:0)
00:14.040 SYSTEM [log-17122-f45b9b] (in 0.005s) mv /tmp/opam-17122-46fd0e/index.tar.gz.part /tmp/opam-17122-46fd0e/index.tar.gz
00:14.040 PARALLEL Next task in job 0: /usr/bin/tar xfz /tmp/opam-17122-46fd0e/index.tar.gz -C /tmp/opam-17122-e3a56e/default.new
00:19.604 PARALLEL Collected task for job 0 (ret:2)
00:19.614 SYSTEM rmdir /tmp/opam-17122-46fd0e
00:19.619 SYSTEM rmdir /tmp/opam-17122-e3a56e/default.new
[ERROR] Could not update repository "default": Failed to extract archive /tmp/opam-17122-46fd0e/index.tar.gz:
"/usr/bin/tar xfz /tmp/opam-17122-46fd0e/index.tar.gz -C /tmp/opam-17122-e3a56e/default.new" exited with
code 2
00:21.366 PARALLEL Job 0 finished
00:21.366 FILE(repos-config) Wrote /home/teg/.opam/repo/repos-config in 0.000s
00:21.366 SYSTEM rm /home/teg/.opam/repo/state-11ABC690.cache
00:21.373 SYSTEM LOCK /home/teg/.opam/repo/state-11ABC690.cache (none => write)
00:21.373 CACHE(repository) Writing the repository cache to ~/.opam/repo/state-11ABC690.cache ...
00:22.029 CACHE(repository) ~/.opam/repo/state-11ABC690.cache written in 0.656s
00:22.029 SYSTEM LOCK /home/teg/.opam/repo/state-11ABC690.cache (write => none)
00:22.029 SYSTEM LOCK /home/teg/.opam/repo/lock (write => none)
00:22.108 SYSTEM LOCK /home/teg/.opam/5.0.0/.opam-switch/lock (none => none)
00:22.108 SYSTEM rmdir /tmp/opam-17122-e3a56e/default
00:25.562 SYSTEM rmdir /tmp/opam-17122-e3a56e
00:25.566 SYSTEM LOCK /home/teg/.opam/repo/lock (none => none)
00:25.566 SYSTEM LOCK /home/teg/.opam/config.lock (write => none)
The man pages for tar (GNU tar 1.34) gives this for return code 2
2 Fatal error. This means that some fatal, unrecoverable error occurred.
The file system have a lot of room:
teg@hilbert:~$ df -H /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 2.0G 97M 1.8G 6% /tmp
teg@hilbert:~$ opam config report
# opam config report
# opam-version 2.1.2
# self-upgrade no
# system arch=x86_64 os=linux os-distribution=debian os-version=12
# solver builtin-mccs+glpk
# install-criteria -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs 3
# repositories 1 (http), 1 (version-controlled) (default repo at ed47929e)
# pinned 0
# current-switch 5.0.0
# ocaml:native true
# ocaml:native-tools true
# ocaml:native-dynlink true
# ocaml:stubsdir /home/teg/.opam/5.0.0/lib/ocaml/stublibs:/home/teg/.opam/5.0.0/lib/ocaml
# ocaml:preinstalled false
# ocaml:compiler 5.0.0
Reactions are currently unavailable