Skip to content

gitlab init: postgres unused client(s) uninstall fails #3065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xaviersand opened this issue Feb 7, 2025 · 0 comments
Open

gitlab init: postgres unused client(s) uninstall fails #3065

xaviersand opened this issue Feb 7, 2025 · 0 comments

Comments

@xaviersand
Copy link

Hi,

i could successfully run a gitlab selfhosted on my local computer.
when i try to run the docker-compose.yml on my proxmox 8.1 hypervisor. (i have a LXC contain running other docker containers)
I encounter this error in the gitlab container.

gitlab-1         | 15 postgresql:5432 gitlabhq_production
gitlab-1         | + gitlab_uninstall_unused_database_client
gitlab-1         | + [[ -f /home/git/.postgresqlrc ]]
gitlab-1         | ++ awk '/^[^#]/ {printf("\|-%s",$1)}' /home/git/.postgresqlrc
gitlab-1         | + DB_CLIENT_VERSIONS_IN_USE='\|-15'
gitlab-1         | + REGEX_DB_CLIENT_VERSIONS_IN_USE='-common\|-15'
gitlab-1         | ++ grep -v -e '-common\|-15'
gitlab-1         | ++ apt-cache pkgnames postgresql-client
gitlab-1         | + UNUSED_DB_CLIENTS='postgresql-client-13
gitlab-1         | postgresql-client-14
gitlab-1         | postgresql-client-16
gitlab-1         | postgresql-client-17'
gitlab-1         | + [[ postgresql-client-13
gitlab-1         | postgresql-client-14
gitlab-1         | postgresql-client-16
gitlab-1         | postgresql-client-17 == '' ]]
gitlab-1         | ++ echo postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17
gitlab-1         | ++ tr '\n' ' '
gitlab-1         | + UNUSED_DB_CLIENTS='postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17 '
gitlab-1         | + echo '- Uninstalling unused client(s): postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17 '
gitlab-1         | + DEBIAN_FRONTEND=noninteractive
gitlab-1         | + apt-get -qq -y purge -- postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17
gitlab-1         | - Uninstalling unused client(s): postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17
gitlab-1         | E: Sub-process /usr/bin/dpkg returned an error code (1)

I started the gitlab container with a bash console and tried to delete these to have a better error message:

(Reading database ... 22245 files and directories currently installed.)
Removing postgresql-contrib (17+267.pgdg22.04+1) ...
dpkg: error processing package postgresql-contrib (--remove):
 cannot remove '/usr/share/doc/postgresql-contrib': Invalid argument
dpkg: too many errors, stopping
Errors were encountered while processing:
 postgresql-contrib
Processing was halted because there were too many errors.

it looks like it's trying to delete '/usr/share/doc/postgresql-contrib' , i don't know if it should or not (i'm not a postgres expert), but i can't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant