[SOLVED] Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
a_subscriber
Level 3
Level 3
Posts: 162
Joined: Fri Dec 01, 2017 10:07 am

[SOLVED] Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by a_subscriber »

Linux Mint 21

I try to install postgresql 9.6 like this:

Code: Select all

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install postgresql-9.6
But get error:

Code: Select all

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-9.6 : Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable
                  Depends: libssl1.1 (>= 1.1.0) but it is not installable
                  Recommends: postgresql-contrib-9.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Last edited by LockBot on Thu Feb 16, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
spamegg
Level 14
Level 14
Posts: 5094
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by spamegg »

I'm not sure why you are trying to install version 9.6. It's not available on the repositories. On Mint 21, there is version 14 available in the default Ubuntu repositories. https://packages.ubuntu.com/jammy/database/postgresql Do you need an older version for a specific reason?
a_subscriber
Level 3
Level 3
Posts: 162
Joined: Fri Dec 01, 2017 10:07 am

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by a_subscriber »

Because my current project work only with PostgreSQL 9.6. It's very legacy project. Migration is not possible.
User avatar
spamegg
Level 14
Level 14
Posts: 5094
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by spamegg »

OK I understand, where are you getting the 9.6 version? Did you add a third party repository to your Software Sources?

Keep in mind that it might be simply impossible to install such an old version to a newer Ubuntu base, because all the dependencies changed and the older versions are now incompatible.

Please share your system info by entering the command inxi -Fxxxmprz into a Terminal and posting its output here.
Image
a_subscriber
Level 3
Level 3
Posts: 162
Joined: Fri Dec 01, 2017 10:07 am

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by a_subscriber »

Code: Select all

inxi -Fxxxmprz
System:
  Kernel: 5.15.0-46-generic x86_64 bits: 64 compiler: gcc v: 11.2.0
    Desktop: Cinnamon 5.4.10 tk: GTK 3.24.33 wm: Mutter vt: 7
    dm: LightDM 1.30.0 Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: LENOVO product: 81T3 v: Legion Y540-17IRH-PG0
    serial: <superuser required> Chassis: type: 10 v: Legion Y540-17IRH-PG0
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>
    UEFI-[Legacy]: LENOVO v: BHCN32WW date: 08/29/2019
Battery:
  ID-1: BAT0 charge: 46.8 Wh (96.9%) condition: 48.3/52.5 Wh (91.9%)
    volts: 12.3 min: 11.3 model: LGC L17L3PG1 type: Li-poly serial: <filter>
    status: N/A cycles: 310
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M545/M546
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: Discharging
Memory:
  RAM: total: 15.55 GiB used: 6.3 GiB (40.5%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: 6-core model: Intel Core i7-9750H bits: 64 type: MT MCP smt: enabled
    arch: Coffee Lake rev: A cache: L1: 384 KiB L2: 1.5 MiB L3: 12 MiB
  Speed (MHz): avg: 1086 high: 1946 min/max: 800/2600 cores: 1: 900 2: 900
    3: 900 4: 900 5: 1946 6: 995 7: 1268 8: 1628 9: 902 10: 900 11: 900 12: 900
    bogomips: 62399
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 470.141.03 pcie: speed: 2.5 GT/s lanes: 16 ports:
    active: none off: eDP-1 empty: DP-1,DP-2,HDMI-A-1 bus-ID: 01:00.0
    chip-ID: 10de:1f91 class-ID: 0300
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-6:3 chip-ID: 04f2:b6d9 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 128 s-size: 381x221mm (15.0x8.7")
    s-diag: 440mm (17.3")
  Monitor-1: DP-4 res: 1920x1080 hz: 60 dpi: 128
    size: 382x215mm (15.0x8.5") diag: 438mm (17.3")
  OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2
    v: 4.6.0 NVIDIA 470.141.03 direct render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel
    v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
  Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel pcie:
    speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10fa class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-46-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp7s0 state: down mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 1-14:5 chip-ID: 8087:0aaa class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter>
    bt-v: 3.0 lmp-v: 5.1 sub-v: 100 hci-v: 5.1 rev: 100
Drives:
  Local Storage: total: 476.94 GiB used: 117.12 GiB (24.6%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L2
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 3L1QEXF7 temp: 33.9 C scheme: MBR
Partition:
  ID-1: / size: 467.89 GiB used: 117.11 GiB (25.0%) fs: ext4
    dev: /dev/nvme0n1p5
  ID-2: /boot/efi size: 511 MiB used: 7.8 MiB (1.5%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 41.0 C pch: 37.0 C mobo: N/A gpu: nvidia
    temp: 41 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: 3069 note: see --pkg apt: 3038 guix-usr: 1 flatpak: 30
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list
    1: deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main
  Active apt repos in: /etc/apt/sources.list.d/audio-recorder-ppa-focal.list
    1: deb http://ppa.launchpad.net/audio-recorder/ppa/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/kelleyk-emacs-focal.list
    1: deb http://ppa.launchpad.net/kelleyk/emacs/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http://packages.linuxmint.com vanessa main upstream import backport
    2: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  No active apt repos in: /etc/apt/sources.list.d/pgadmin4.list
  No active apt repos in: /etc/apt/sources.list.d/pgdg.list
  Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
    1: deb [arch=amd64] https://repo.skype.com/deb stable main
  Active apt repos in: /etc/apt/sources.list.d/teams.list
    1: deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main
  Active apt repos in: /etc/apt/sources.list.d/teamviewer.list
    1: deb https://linux.teamviewer.com/deb stable main
Info:
  Processes: 433 Uptime: 1m wakeups: 3 Init: systemd v: 249 runlevel: 5
  Compilers: gcc: 11.2.0 alt: 11/9 Shell: Bash v: 5.1.16
  running-in: gnome-terminal inxi: 3.3.13
User avatar
spamegg
Level 14
Level 14
Posts: 5094
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by spamegg »

Code: Select all

No active apt repos in: /etc/apt/sources.list.d/pgadmin4.list
No active apt repos in: /etc/apt/sources.list.d/pgdg.list
OK, looks like you have added some third party repositories to your Software Sources for PostgreSQL. But they are... inactive?

Can you show the contents of those files?

Code: Select all

cat /etc/apt/sources.list.d/pgadmin4.list

Code: Select all

cat /etc/apt/sources.list.d/pgdg.list
Can you also give a link to the website that told you to add those repositories?

The PostgreSQL website says that 9.6 is no longer supported. It's probably not safe to deploy this project. Because there will be a lot of security vulnerabilities. I know you said it's legacy and migration is not possible, but you should think about a solution to this situation.
a_subscriber
Level 3
Level 3
Posts: 162
Joined: Fri Dec 01, 2017 10:07 am

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by a_subscriber »

Code: Select all

cat /etc/apt/sources.list.d/pgadmin4.list
# deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/uma pgadmin4 main



cat /etc/apt/sources.list.d/pgdg.lis
cat: /etc/apt/sources.list.d/pgdg.lis: No such file or directory
User avatar
spamegg
Level 14
Level 14
Posts: 5094
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by spamegg »

In the second one looks like you missed the letter t at the end of list. Could you try again please?

In the first one, I followed the link https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/uma and it's a dead link, gave me a 404. So you won't get anything from there, because it doesn't exist!

I think this happened probably because their instructions must have used /etc/lsb-release which, in our case, gives the Mint codename uma. I'm on Mint 21 so it will give "vanessa":

Code: Select all

 ➜ cat /etc/lsb-release 
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=21
DISTRIB_CODENAME=vanessa
DISTRIB_DESCRIPTION="Linux Mint 21 Vanessa"
But their repositories are named after Ubuntu codenames (like focal, jammy etc.):
Screenshot from 2022-08-18 01-26-29.png
So it would be very nice if you had the link with the repository instructions that you used.

Also it looks like it's commented out with a # so it's disabled!

My guess is that the correct repository for Mint 21 Vanessa would be using "jammy" like this:

Code: Select all

deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/jammy pgadmin4 main
Anyway... none of this will help you get PostGreSQL 9.6, which is not available anywhere in their repository https://ftp.postgresql.org/pub/ for Ubuntu 22.04 Jammy.

The only thing I can find is a snapshot of 9.6 here https://ftp.postgresql.org/pub/snapshot/9.6/ but it requires building from source.

There are some .deb files here https://ftp.postgresql.org/pub/repos/ap ... resql-9.6/ and you would be interested in the ones that have "2204" in the name (which is Jammy) but I'm not sure how to go from there.

Other than that there is no way to install 9.6 on Mint 21. I think you would have better luck installing Ubuntu 18.04 in Virtualbox and try to install 9.6 there.
a_subscriber
Level 3
Level 3
Posts: 162
Joined: Fri Dec 01, 2017 10:07 am

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by a_subscriber »

OK, thanks for your advice. I remove Linux Mint 21 and install Linux Mint 20.3. And now PostgreSQL 9.6. success installed.

Code: Select all

sudo apt-get install postgresql-9.6
User avatar
spamegg
Level 14
Level 14
Posts: 5094
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable

Post by spamegg »

Great! Mark your top post as [SOLVED], thanks!
Image
a_subscriber
Level 3
Level 3
Posts: 162
Joined: Fri Dec 01, 2017 10:07 am

Re: [SOLVED] Can't install PostgreSQL 9.6 on Linux Mint 21 - Depends: libldap-2.4-2 (>= 2.4.7) but it is not installabl

Post by a_subscriber »

How install PostgreSQL 9.6 on Linux Mint 21?

I think this maybe a solution:
f you need a very specific version of PostgreSQL, then your best option is to use a Docker container. This will give you the added benefit of not needing to worry about OS updates upgrading the database engine.
Locked

Return to “Installation & Boot”