Recent

Author Topic: error connecting to postgresql  (Read 1437 times)

crixtiano

  • Newbie
  • Posts: 3
error connecting to postgresql
« on: December 11, 2019, 10:30:57 pm »
When trying to connect to PostgreSQL using the TPQConnection object, the error occurs:

"Can not load PostgreSQL client library "libpq.dll". Check your installation."

(see attached image)

Versions:

PC (Server DB):
    Postgres 10.10
    Ubuntu 18.04.3 LTS 32 bits
    (database access successfully tested with pgAdmin 4)

PC with Lazarus
    Lazarus
        Version 2.02
        Date: 2019-04-13
        FPC version: 3.0.4
        SVN: 60954
        x86_64-win64-win32/win64
    Windows 8 64 bits


Does anyone know how to solve this?

Thank you.

Cristiano M. Magalhaes




Miflon

  • New Member
  • *
  • Posts: 10
Re: error connecting to postgresql
« Reply #1 on: December 12, 2019, 08:40:07 am »
Hi crixtiano.
That situation was faced by me few months ago when I installed wappstack-7.3.11-0 for a local use. You need the following 5 dll files
  • libeay32.dll,
  • libiconv-2.dll,
  • libintl-8.dll,
  • libpq.dll and
  • ssleay32.dll.
All of them must be 64 bits. You can use Dependency Walker to test. These files must be placed in "C:\Windows\System32\" directory.
For me libpq.dll from Postgresql did not work. I was forced to use a former libpq.dll from an older install. Here are  the properties of the 5 files:
  • libeay32.dll:version 1.0.2.10; date: 04/11/2019
  • libiconv-2.dll:version 1.16.0.0; date: 04/11/2019
  • libintl-8.dll:version 0.1.20.0; date: 03/11/2019
  • libpq.dll:version 9.6.3.17128; date: 14/07/2017 and
  • ssleay32.dll:version 1.0.2.10; date: 04/11/2019
It's the first time I help somebody so I post under the watchfull eyes of the experts of this forum.
Michel.
« Last Edit: December 12, 2019, 09:00:48 am by Miflon »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: error connecting to postgresql
« Reply #2 on: December 12, 2019, 09:27:42 am »
It's the first time I help somebody so I post under the watchfull eyes of the experts of this forum.
Michel.

You're doing fine, but I think the best answer would be "For Windows 8 you're going to need the PostgreSQL client bundle from here".

It's a very long time since I've had to do this for Windows, but I've certainly seen that sort of thing from Postgres in the past: installers which were very picky about what version of OS they'd run under (even if the payload was far more tolerant) and so on.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

darksoft

  • Newbie
  • Posts: 3
Re: error connecting to postgresql
« Reply #3 on: December 20, 2019, 03:33:57 pm »
You can also put them in your application directory.

crixtiano

  • Newbie
  • Posts: 3
Re: error connecting to postgresql
« Reply #4 on: January 17, 2020, 08:28:28 pm »

  • libeay32.dll,
  • libiconv-2.dll,
  • libintl-8.dll,
  • libpq.dll and
  • ssleay32.dll.
All of them must be 64 bits. You can use Dependency Walker to test.

Please, where can I download these dll files?

Where do these DLLs come from? What program do they belong to?

Thank you!

Cristiano M. Magalhaes

 

TinyPortal © 2005-2018