Running in error: curl: (23) Failed writing body (0 != 2193)

I am relatively new to Ubuntu. I did a fresh install of Ubuntu 20.04 on my Dell machine. When I tried to install incus following the instructions from here, the curl command failed. Looks like the directory /etc/apt/keyrings doesn’t exist by default. So I need to create it manually. Wondering if this is an expected behavior ?


root@dell:~# uname -a
Linux dell 5.15.0-67-generic #74~20.04.1-Ubuntu SMP Wed Feb 22 14:52:34 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

root@dell:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION=“Ubuntu 20.04.6 LTS”
NAME=“Ubuntu”
VERSION=“20.04.6 LTS (Focal Fossa)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 20.04.6 LTS”
VERSION_ID=“20.04”
HOME_URL=“https://www.ubuntu.com/
SUPPORT_URL=“https://help.ubuntu.com/
BUG_REPORT_URL=“Bugs : Ubuntu
PRIVACY_POLICY_URL=“Data privacy | Ubuntu
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

root@dell:~# curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --show-keys --fingerprint
pub rsa3072 2023-08-23 [SC] [expires: 2025-08-22]
4EFC 5906 96CB 15B8 7C73 A3AD 82CC 8797 C838 DCFD
uid Zabbly Kernel Builds info@zabbly.com
sub rsa3072 2023-08-23 [E] [expires: 2025-08-22]

root@dell:~# curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc
curl: (23) Failed writing body (0 != 2193)

root@dell:~# ls -ld /etc/apt/keyrings
ls: cannot access ‘/etc/apt/keyrings’: No such file or directory

root@dell:~# mkdir /etc/apt/keyrings

root@dell:~# curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc


Once I created that directory manually, the installation steps worked fine.

Ah yeah, /etc/apt/keyrings doesn’t exist in 20.04 but does in 22.04.
I’ve updated the instructions to add a mkdir -p /etc/apt/keyrings.

2 Likes