skip to Main Content

I have to upgrade gitlab-ce version from 16.2 to 16.4 in ubuntu 22.04. but I received below error:

(Reading database ... 230526 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_16.4.1-ce.0_amd64.deb ...
gitlab preinstall: It seems you are upgrading from 16.2 to 16.4.
gitlab preinstall: It is required to upgrade to the latest 16.3.x version first before proceeding.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/index.html#upgrade-paths
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_16.4.1-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_16.4.1-ce.0_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

2

Answers


  1. Chosen as BEST ANSWER

    Edit /etc/gitlab/gitlab.rb (or appropriate path) Edit the grafana[enable] value to be false. On my config this was on line 1689, but I recommend you search for the string grafana to find it.

    grafana['enable'] = false

    Reconfigure GitLab by running gitlab-ctl reconfigure. Let this run and it should end with gitlab Reconfigured!

    You can now resume the apt update that failed due to having Grafana enabled.


  2. Please go through with error i.e.

    "gitlab preinstall: It is required to upgrade to the latest 16.3.x version first before proceeding"

    First update gitlab-ce 16.3.x

    sudo apt update

    sudo apt install gitlab=16.3.0

    Once done now you can update to 16.4.x

    sudo apt install gitlab

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search