Never experienced this before. zig fetch otherwise works fine for me.
Background: wanted to use a library I forked; here’s the full command + output:
zig fetch https://github.com/FObersteiner/zigserial/archive/refs/tags/v0.0.1.tar.gz
error: unable to rename temporary directory '/home/[user]/.cache/zig/tmp/a61345c038aa0d65' into package cache directory '/home/[user]/.cache/zig/p/1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855': FileNotFound
I solved the issue by manually creating '/home/[user]/.cache/zig/p/1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', copy-pasting the library code there and setting 1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 as the library hash in the .zon file of the application that wants to use the lib.
While that works, it’s kind of cumbersome and I was wondering what mischief I might have created to trigger this error?
That’s what I through too, but that didn’t change anything
Edit: gave this another try on another, freshly booted machine: same result. For context, I’m running this on a debian Linux desktop machine, nothing special.
besides the fetch command (see OP), zig build test or zig build run triggers the issue if you just clone the repo without modifying the cache as described in the OP. That happens with Zig 0.12, 0.13 and master.