Discrepancies when installing postgres

Hi there and thx for reading and answering this post if you can.

I’m trying to install postgres client/server and also postgis. But when I select for example postgres 15, pg 16 is also selected and my app reports errors when both are installed. Then I wanted to downgrade to postgres 14 but postgres 15 is selected again.
Is is possible to have a postgres 15 only installed even if I compile postgis myself ?
Thx again

C.

Quick search for postgis shows no compatible version for postgres 16:

pavin@suse-pc:~> zypper se postgis
Loading repository data...
Reading installed packages...

S | Name                       | Summary                                                 | Type
--+----------------------------+---------------------------------------------------------+--------
  | postgresql11-postgis       | Geographic Information Systems Extensions to PostgreSQL | package
  | postgresql11-postgis-utils | The utils for PostGIS                                   | package
  | postgresql12-postgis       | Geographic Information Systems Extensions to PostgreSQL | package
  | postgresql12-postgis-utils | The utils for PostGIS                                   | package
  | postgresql13-postgis       | Geographic Information Systems Extensions to PostgreSQL | package
  | postgresql13-postgis-utils | The utils for PostGIS                                   | package
  | postgresql14-postgis       | Geographic Information Systems Extensions to PostgreSQL | package
  | postgresql14-postgis-utils | The utils for PostGIS                                   | package
  | postgresql15-postgis       | Geographic Information Systems Extensions to PostgreSQL | package
  | postgresql15-postgis-utils | The utils for PostGIS                                   | package

Dependency requirements for postgis 15 show corresponding postgres 15 server and not any other version.

pavin@suse-pc:~> zypper if --requires postgresql15-postgis
Loading repository data...
Reading installed packages...


Information for package postgresql15-postgis:
---------------------------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : postgresql15-postgis
Version        : 3.3.4-1.8
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 50.4 MiB
Installed      : No
Status         : not installed
Source package : postgresql15-postgis-3.3.4-1.8.src
Upstream URL   : https://postgis.net/
Summary        : Geographic Information Systems Extensions to PostgreSQL
Description    : 
    PostGIS is a spatial database extender for PostgreSQL object-relational
    database. It adds support for geographic objects allowing location queries
    to be run in SQL.
Requires       : [40]
    libstdc++.so.6()(64bit)
    libstdc++.so.6(GLIBCXX_3.4)(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libc.so.6(GLIBC_2.38)(64bit)
    libm.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libm.so.6(GLIBC_2.2.5)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
    libm.so.6(GLIBC_2.29)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.32)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.29)(64bit)
    libglib-2.0.so.0()(64bit)
    libgobject-2.0.so.0()(64bit)
    libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
    ld-linux-x86-64.so.2()(64bit)
    ld-linux-x86-64.so.2(GLIBC_2.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.8)(64bit)
    libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
    libxml2.so.2()(64bit)
    libxml2.so.2(LIBXML2_2.4.30)(64bit)
    libm.so.6(GLIBC_2.35)(64bit)
    libxml2.so.2(LIBXML2_2.6.0)(64bit)
    libgtk-x11-2.0.so.0()(64bit)
    libpq.so.5()(64bit)
    libpcre2-8.so.0()(64bit)
    proj
    libjson-c.so.5()(64bit)
    libjson-c.so.5(JSONC_0.14)(64bit)
    libxml2.so.2(LIBXML2_2.5.2)(64bit)
    libprotobuf-c.so.1()(64bit)
    libprotobuf-c.so.1(LIBPROTOBUF_C_1.0.0)(64bit)
    libgdal.so.34()(64bit)
    libproj.so.25()(64bit)
    libgeos_c.so.1()(64bit)
    libSFCGAL.so.1()(64bit)
    postgresql15-server = 15.6
    /bin/sh
    update-alternatives

Could you try removing existing postgres and postgis versions and try this:

sudo zypper in --no-recommends postgresql15-postgis

This should install postgis 15, postgres 15, and their associated dependencies without pulling in any other version.

pavin@suse-pc:~> sudo zypper in --dry-run --no-recommends postgresql15-postgis
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 33 NEW packages are going to be installed:
  libarmadillo12 libarpack2 libboost_serialization1_84_0 libcryptopp8_9_0 libfreexl1 libgdal34 libgdal-drivers libgeos3_12_1 libgeos_c1 libgeotiff5 libgmpxx4 libhdf5-200
  libhdf5_cpp200 libhdf5_hl200 libkea1_5 libnetcdf19 libodbc2 libOpenCL1 libOpenSceneGraph161 libOpenThreads21 libpq5 libproj25 librttopo1 libSFCGAL1 libspatialite8
  libsuperlu6 libxerces-c-3_2 postgresql postgresql15 postgresql15-postgis postgresql15-server postgresql-server proj

33 new packages to install.
Overall download size: 39.3 MiB. Already cached: 0 B. After the operation, additional 184.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): n

I know that, that’s why I wanted to downgrade and even compile postgis myself

Try installing with the --no-recommends option so zypper doesn’t pull in other postgres versions.

and I got:
Problem: nothing provides ‘libc.so.6(GLIBC_2.38)(64bit)’ needed by the to be installed postgresql15-postgis-3.3.4-lp156.29.3.x86_64

Looks like you’ve got some dev repos, post the output of:

zypper lr -Ed

and when I do:

sudp zypper in postgresql15-server

postgresql16 is installed

Basic research shows, that no matter which postgresql version you install on Leap, always parts of version 16 gets pulled…easy to see:

leaptest@test:~> LANG=C sudo zypper in --no-recommends postgresql15
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 3 NEW packages are going to be installed:
  libpq5 postgresql postgresql15

3 new packages to install.
Overall download size: 1.9 MiB. Already cached: 0 B. After the operation, additional 8.1 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving: libpq5-16.2-150200.5.10.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                                  (1/3), 218.2 KiB    
Retrieving: libpq5-16.2-150200.5.10.1.x86_64.rpm ..........................................................................................................................................................................................[done]
Retrieving: postgresql-16-150500.10.3.2.noarch (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                                (2/3),  18.4 KiB    
Retrieving: postgresql-16-150500.10.3.2.noarch.rpm ..........................................................................................................................................................................[done (171.9 KiB/s)]
Retrieving: postgresql15-15.6-150200.5.22.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                            (3/3),   1.6 MiB    
Retrieving: postgresql15-15.6-150200.5.22.1.x86_64.rpm ........................................................................................................................................................................[done (5.1 MiB/s)]

Checking for file conflicts: ..............................................................................................................................................................................................................[done]
(1/3) Installing: libpq5-16.2-150200.5.10.1.x86_64 ........................................................................................................................................................................................[done]
(2/3) Installing: postgresql-16-150500.10.3.2.noarch ......................................................................................................................................................................................[done]
(3/3) Installing: postgresql15-15.6-150200.5.22.1.x86_64 ..................................................................................................................................................................................[done]
leaptest@test:~> 

leaptest@test:~> LANG=C sudo zypper in --no-recommends postgresql14
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 3 NEW packages are going to be installed:
  libpq5 postgresql postgresql14

3 new packages to install.
Overall download size: 1.8 MiB. Already cached: 0 B. After the operation, additional 7.8 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving: libpq5-16.2-150200.5.10.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                                  (1/3), 218.2 KiB    
Retrieving: libpq5-16.2-150200.5.10.1.x86_64.rpm ..............................................................................................................................................................................[done (1.3 MiB/s)]
Retrieving: postgresql-16-150500.10.3.2.noarch (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                                (2/3),  18.4 KiB    
Retrieving: postgresql-16-150500.10.3.2.noarch.rpm ..........................................................................................................................................................................[done (216.7 KiB/s)]
Retrieving: postgresql14-14.11-150200.5.39.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                           (3/3),   1.6 MiB    
Retrieving: postgresql14-14.11-150200.5.39.1.x86_64.rpm .......................................................................................................................................................................[done (4.4 MiB/s)]

Checking for file conflicts: ..............................................................................................................................................................................................................[done]
(1/3) Installing: libpq5-16.2-150200.5.10.1.x86_64 ........................................................................................................................................................................................[done]
(2/3) Installing: postgresql-16-150500.10.3.2.noarch ......................................................................................................................................................................................[done]
(3/3) Installing: postgresql14-14.11-150200.5.39.1.x86_64 .................................................................................................................................................................................[done]
leaptest@test:~> 

leaptest@test:~> LANG=C sudo zypper in --no-recommends postgresql13
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 3 NEW packages are going to be installed:
  libpq5 postgresql postgresql13

3 new packages to install.
Overall download size: 1.8 MiB. Already cached: 0 B. After the operation, additional 7.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving: libpq5-16.2-150200.5.10.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                                  (1/3), 218.2 KiB    
Retrieving: libpq5-16.2-150200.5.10.1.x86_64.rpm ..............................................................................................................................................................................[done (1.4 MiB/s)]
Retrieving: postgresql-16-150500.10.3.2.noarch (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                                (2/3),  18.4 KiB    
Retrieving: postgresql-16-150500.10.3.2.noarch.rpm ..........................................................................................................................................................................[done (202.9 KiB/s)]
Retrieving: postgresql13-13.14-150200.5.53.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                                                                           (3/3),   1.5 MiB    
Retrieving: postgresql13-13.14-150200.5.53.1.x86_64.rpm .......................................................................................................................................................................[done (4.2 MiB/s)]

Checking for file conflicts: ..............................................................................................................................................................................................................[done]
(1/3) Installing: libpq5-16.2-150200.5.10.1.x86_64 ........................................................................................................................................................................................[done]
(2/3) Installing: postgresql-16-150500.10.3.2.noarch ......................................................................................................................................................................................[done]
(3/3) Installing: postgresql13-13.14-150200.5.53.1.x86_64 .................................................................................................................................................................................[done]
leaptest@test:~> 

| Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service

—±---------------------------------------------±-------------------------------------------------------------±--------±----------±--------±---------±-------±---------------------------------------------------------------------------------------------±-------
1 | GEO | GEO | Yes | ( p) Yes | No | 99 | N/A | http://download.opensuse.org/repositories/Application:/Geo/openSUSE_15.5/ |
2 | ftp.gwdg.de-openSUSE_Leap_$releasever | Packman Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | Index of /pub/linux/misc/packman/suse/openSUSE_Leap_15.5/ |
4 | https-download.opensuse.org-0ca0b10c | SUSE:SLE-15:Update | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/update/leap/15.4/sle |
5 | https-download.opensuse.org-2b0cb376 | openSUSE:Leap:15.5:Update | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/update/leap/15.5/oss/ |
8 | https-download.opensuse.org-7eb1b989 | openSUSE:Leap:15.5 | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/openSUSE:/Leap:/15.5/standard/ |
7 | https-download.opensuse.org-72ed70fc | openSUSE:Backports:SLE-15-SP5 | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP5/standard/ |
3 | https-download.opensuse.org-073cb250 | SUSE:SLE-15-SP4:Update | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/update/leap/15.4/sle/ |
9 | https-download.opensuse.org-9980f45e | multimedia:libs | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/multimedia:/libs/15.5/ |
6 | https-download.opensuse.org-46527370 | openSUSE:Backports:SLE-15-SP4:Checks | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4:/Checks/standard/ |
10 | https-download.opensuse.org-c4fd1980 | SUSE:SLE-15-SP5:Update | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/update/leap/15.5/sle |
11 | https-download.opensuse.org-c7986803 | home:alveus:plex | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/home:/alveus:/plex/15.5/ |
12 | https-download.opensuse.org-ce1f90ad | openSUSE:Backports:SLE-15-SP5:Update | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP5:/Update/standard/ |
13 | https-download.opensuse.org-d5442abd | multimedia:apps | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/multimedia:/apps/15.5/ |
14 | https-download.opensuse.org-e2232f40 | SUSE:SLE-15-SP3:Update | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/update/leap/15.3/sle/ |
16 | opensuse-guide.org-openSUSE_Leap_$releasever | Libdvdcss Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | http://opensuse-guide.org/repo/openSUSE_Leap_15.5/ |
17 | packman | Packman | Yes | (r ) Yes | Yes | 90 | rpm-md | Index of /pub/linux/misc/packman/suse/openSUSE_Leap_15.5/ |
18 | postgis | postgis | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/Application:/Geo/15.6/ |
20 | repo-backports-update | Update repository of openSUSE Backports | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/15.5/backports/ |
25 | repo-non-oss | Dépôt Non-OSS | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/non-oss/ |
26 | repo-openh264 | Open H.264 Codec (openSUSE Leap) | Yes | (r ) Yes | Yes | 99 | rpm-md | Index of /openh264/openSUSE_Leap |
27 | repo-oss | Dépôt principal | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/oss/ |
29 | repo-sle-update | Update repository with updates from SUSE Linux Enterprise 15 | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/15.5/sle/ |
31 | repo-update | Dépôt principal de mise à jour | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/15.5/oss |
32 | repo-update-non-oss | Dépôt de mises à jour (Non-OSS) | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/15.5/non-oss/ |
33 | snappy | snappy | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.4 |

You have many old repos for Leap 15.4 and Leap 15.3 which need to be deleted to have a clean repo list.

List of official repos:
https://en.opensuse.org/Package_repositories

1 Like

will do. thx. I tell you

I’m on TW. Oops :person_facepalming:

done. Let’s check out

No, it doesn’t work. Still loading postgres 16 when I want pg 15 everywhere

Please, then use the feature of “Performatted text” (the button with </> in the tool bar of the post editor) for your computer text. And always copy/paste complete, starting with the line with the prompt and the command and ending with the line with the new prompt.

I can confirm this (as seen in my testoutput). So this is either intentional from the packagers. Or a packaging bug…

Ok thx for the confirmation. I’m not totally crazy. So, in this case, what should I do ?

“It does not work” is not a good problem description. Better show what happens.

And it seems that you have changed your repo list, so better show the new one. People here can not look over your shoulder.
And, after you have removed those repos, you should make sure that no packages from those repos are still installed. Else the mess that may have been created by that repo list might not have been cleaned up.

1 Like
zypper lr -Ed
#  | Alias                                        | Name                                                         | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                       | Service
---+----------------------------------------------+--------------------------------------------------------------+---------+-----------+---------+----------+--------+---------------------------------------------------------------------------+--------
 1 | GEO                                          | GEO                                                          | Yes     | ( p) Yes  | No      |   99     | N/A    | http://download.opensuse.org/repositories/Application:/Geo/openSUSE_15.5/ | 
 2 | ftp.gwdg.de-openSUSE_Leap_$releasever        | Packman Repository                                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.5/        | 
 3 | https-download.opensuse.org-2b0cb376         | openSUSE:Leap:15.5:Update                                    | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/update/leap/15.5/oss/                       | 
 4 | https-download.opensuse.org-7eb1b989         | openSUSE:Leap:15.5                                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/openSUSE:/Leap:/15.5/standard/ | 
 5 | https-download.opensuse.org-9980f45e         | multimedia:libs                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/multimedia:/libs/15.5/         | 
 6 | https-download.opensuse.org-c4fd1980         | SUSE:SLE-15-SP5:Update                                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/update/leap/15.5/sle                        | 
 7 | https-download.opensuse.org-c7986803         | home:alveus:plex                                             | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/home:/alveus:/plex/15.5/       | 
 8 | https-download.opensuse.org-d5442abd         | multimedia:apps                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.opensuse.org/repositories/multimedia:/apps/15.5/         | 
10 | opensuse-guide.org-openSUSE_Leap_$releasever | Libdvdcss Repository                                         | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://opensuse-guide.org/repo/openSUSE_Leap_15.5/                        | 
11 | packman                                      | Packman                                                      | Yes     | (r ) Yes  | Yes     |   90     | rpm-md | https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.5/       | 
13 | repo-backports-update                        | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/backports/                  | 
18 | repo-non-oss                                 | Dépôt Non-OSS                                                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/non-oss/         | 
19 | repo-openh264                                | Open H.264 Codec (openSUSE Leap)                             | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://codecs.opensuse.org/openh264/openSUSE_Leap/                        | 
20 | repo-oss                                     | Dépôt principal                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.5/repo/oss/             | 
22 | repo-sle-update                              | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/sle/                        | 
24 | repo-update                                  | Dépôt principal de mise à jour                               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/oss                         | 
25 | repo-update-non-oss                          | Dépôt de mises à jour (Non-OSS)                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.5/non-oss/

as you can see, all 15.5 repos, no mismatch, no fancy stuff.