Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id D720C22597B for <~alpine/apk-tools@lists.alpinelinux.org>; Tue, 7 Jan 2025 08:42:52 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-53f757134cdso16086113e87.2 for <~alpine/apk-tools@lists.alpinelinux.org>; Tue, 07 Jan 2025 00:42:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736239371; x=1736844171; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wexNHx6R5xSMx5M/O5P7fNB2cHepBpqReYmhgVcUGhs=; b=QX+f4QP1req2fm3zAJZ/M3r5AshhEPW4lxRUzj9W9mNMDlDzT6fyL7VFHSBqL3maw3 ZAUld0xtKontqhZZZpgjGJuEl78ZejTT3mMdiDBvdsVy7CXSsUfEBO9b7XNGCGfvwQKp sV9xWaMl8/kGoBII59gCqc+q7jUSrLDh2eUtbpj1oXd7wW8j80Zei6mTUl8gLK53yxDB aClqMIA2AU9cT/BNECNKyuyOdlph0eraD078SF6qnOTWKA4uOgnqQ02AdW1Hux8FALrg v3LpCw2qsPIO3MgzO6hFy+YOdAmPp4tAxde1xwa5PykDUMDEODteOUAPsID8fOfDHUfv e7Sg== X-Gm-Message-State: AOJu0YyOvikcADnc9TmSDxuMCGY+J2CIa/B9Ce7ntOzi5d9ZOBEal5SX EfVJhmQ7br2EoNYIYTZ5rbssuVuuulrB7mmJ9+Bb+GvpsP05DZK7wJyJCA== X-Gm-Gg: ASbGncuxAvtguKm+m/CDAmwcwK1SGBgP7uGdT2xpYN7UbiSZcfzRzQ4BjanUwKkx7LZ vEcsA8GBgEfZJ0zkM7Zh0QT4k71vrLRgH06OCuXZgITRmn2W963CRrcqSIBav+iQLM1B+3i0t0R quSygtdpVPH0L71u+dXtSXGkH4xIDWQ7CBuizkMrKSriG53GfPn6W46rJpE0tBlhycJFEaY9qHb f8a0Td2PA2GF9RgV7W+NZUx0XrqwsNcn6TQO+tKjRWFlP/cPNQJ6G76ZjcvE70qnZuu5aSh1AiY uyGVITgs0BSrxiLGRhnMIUsUt5rn X-Google-Smtp-Source: AGHT+IGSS9tNfQTvD0nga+exOQv1QxBAMT/qcd3GNpkZ8G1xfFpRl84GK39en+dD+v0YaX/GCOqDHA== X-Received: by 2002:a05:6512:1329:b0:541:8e09:ffad with SMTP id 2adb3069b0e04-5422954a544mr17903073e87.33.1736239371105; Tue, 07 Jan 2025 00:42:51 -0800 (PST) Received: from onyx.my.domain (n7lgym48fv6ct6ybn12-1.v6.elisa-mobile.fi. [2001:999:708:543a:5bf6:a81b:eef1:5356]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-542235f6073sm5215042e87.27.2025.01.07.00.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 00:42:50 -0800 (PST) Date: Tue, 7 Jan 2025 10:42:48 +0200 From: Timo Teras To: Arjan Bouter Cc: ~alpine/apk-tools@lists.alpinelinux.org Subject: Re: apk rebuild database? Message-ID: <20250107104248.46cd4cee@onyx.my.domain> In-Reply-To: <20250106185651.69029a37@tonberry> References: <20250106185651.69029a37@tonberry> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 6 Jan 2025 18:56:51 +0100 Arjan Bouter wrote: > when I try to use apk to update, add or remove applications I get the > following error: > > ERROR: Unable to read database state: package file format error > ERROR: Failed to open apk database: package file format error > > Strace shows a bit more info: > > read(7, "C:Q1DAq8+0eVL2Ce+rsHzYHUPCmuEy8="..., 131072) = 131072 > close(7) = 0 > munmap(0x7f5d4fdd3000, 135168) = 0 > writev(2, [{iov_base="", iov_len=0}, {iov_base="ERROR: ", iov_len=7}], > 2) = 7 writev(2, [{iov_base="Unable to read database state: p"..., > iov_len=56}, {iov_base=NULL, iov_len=0}], 2) = 56 writev(2, > [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2) = 1 > > Is there a way to recreate the database state file? Generally only by reinstalling the system. Any idea how it went to this state? Maybe its possible to fix it manually. Timo