Sharing: Sharing: `dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_14.6.0-ce.0_amd64.deb (--unpack):`

:~$ apt list --upgradable
Listing... Done
gitlab-ce/focal 14.6.0-ce.0 amd64 [upgradable from: 14.5.2-ce.0]
N: There are 143 additional versions. Please use the '-a' switch to see them.
:~$ sudo apt install gitlab-ce*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'gitlab-ce' for glob 'gitlab-ce*'
...
...
Reading changelogs... Done
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
(Reading database ... 13810332 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_14.6.0-ce.0_amd64.deb ...
gitlab preinstall: 
gitlab preinstall: This node does not appear to be running a database
gitlab preinstall: Skipping version check, if you think this is an error exit now
gitlab preinstall: 
gitlab preinstall: Checking for unmigrated data on legacy storage
gitlab preinstall: 
gitlab preinstall: Upgrade failed. Could not check for unmigrated data on legacy storage.
gitlab preinstall: 
gitlab preinstall: /var/lib/dpkg/tmp.ci/preinst: 102: gitlab-rake: not found
gitlab preinstall: 
gitlab preinstall: If you want to skip this check, run the following command and try again:
gitlab preinstall: 
gitlab preinstall:  sudo touch /etc/gitlab/skip-unmigrated-data-check
gitlab preinstall: 
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_14.6.0-ce.0_amd64.deb (--unpack):
 new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/gitlab-ce_14.6.0-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

system prompt me above error when $ sudo apt update few days ago…

For Ubuntu 20.04, arm64 packages are also available.

1. Install and configure the necessary dependencies

sudo apt-get update sudo apt-get install -y curl openssh-server ca-certificates tzdata perl

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

sudo apt-get install -y postfix

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

Source: Download and install GitLab | GitLab