Bug report on Windows 10 x64
Postgre 11.6
timescaledb 1.5.1
Relevant system information:
postgres --version): [e.g. 10.5, 9.6.10]\dx in psql): [e.g. 1.0.0]Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you _expected_ to happen.
Actual behavior
A clear and concise description of what _actually_ happened.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Hi,
I'm running into the same issue with exact same setup, postgres 11.6.3 and timescaledb 1.5.1 on Windows 10 x64. Instllation was done as described on https://docs.timescale.com/latest/getting-started/installation/windows/installation-windows
Reproduce
Expected behavior
Database extended with TimescaleDB
Actual behavior
The following error is thrown
ERROR: could not load library "D:/tools/postgresql-11.6.3/lib/timescaledb-1.5.1.dll": The specified module could not be found. See screenshot for confirmation on file existence.

Additional context
While trying to solve the error I came across solutions for older versions of Postgres and/or Timescale. Most were stating that two dll files were missing. I tried adding those to the lib directory and restarting the postgres service, ended up with similar results. (dll files acquired by fetching postgis 2.5 and copying them over).

@kvroegop Thank you for the detailed report.
Can you check permissions on TimescaleDB files in the lib? Can you check if giving a lot of permissions will solve the problem?
@k-rus
I did the following things with still the same result:
Event though I knew this would have no influence I also started pgAdmin and Powershell with administrative privileges to exclude any possible issues with rights.
Thanks for checking if it is a permission error.
Can you look if discussion in https://github.com/timescale/timescaledb/issues/1458 helps?
Alright, I've done some dependency checkingg with Dependencies (https://github.com/lucasg/Dependencies) only to get to the following result.

I verified that VC redist was installed, both the x64 and x86 versions. The version linked from the install guide gave the message that a newer version was installed. The download from microsoft that includes 2015, 2017 and 2019 (https://support.microsoft.com/nl-nl/help/2977003/the-latest-supported-visual-c-downloads) did install (again both x64 and x86). After rebooting and checking the dependencies the result was the same. I also checked pgadmin and the same result there as well.
Edit: To give a bit of context to the image, both libeay32 and ssleay32 can be found, going down the error stack 'api-ms-win-core-wow64-l1-1-0.dll' is the one not found, that triggered me to re-check the vc redist installations.
Working for me
And I feel a bit stupid. Per accident I dropped libeay and ssleay in the _lib_ directory, but they should be in the _bin_ directory for the Postgres install. I corrected that and now it works for me.
Edit: Seeing that this issue keeps popping up for Windows based systems, is it possible to add both dll files during installation?
Great that you fixed your issue!
Edit: Seeing that this issue keeps popping up for Windows based systems, is it possible to add both dll files during installation?
I will keep this issue around to check if it can be done anything around these files.
I got the error
FEL: kunde inte ladda l盲nkbibliotek "E:/Program Files/PostgreSQL/11/lib/timescaledb-1.6.0.dll": The specified module could not be found.
Having swedish installation, but the message is the same...
Installed Visual C++ Redistributable, did not help.
The ssleay32.dll and libeay32.dll were missing. It seems that you should provide them. Why should user go and find them from other package like postgis package if they are dependencies for timescaleDB?
After adding those and restarting the service, everything loaded correctly. Not issue with redistributable, not issue with permissions it seems, but dependencies that are provided by 3rd party usually.
Maybe in the documentation at least it should then provide the link to download them and point out that they are needed as well for windows installation. Currently the information is only in issues like this one.
i have got the same problem , when i run
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
query , i get
ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/timescaledb-1.6.0.dll": The specified module could not be found.
SQL state: XX000
and this particular dll is there in that location in error message
i have got the same problem , when i run
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
query , i get
ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/timescaledb-1.6.0.dll": The specified module could not be found.
SQL state: XX000
and this particular dll is there in that location in error message
Try getting 'ssleay32' and 'libeay32' dll files into your postgres bin direcory. You can do this by installing PostGIS and copying those files over from ...\postgresql-11.6.3\bin\postgisgui to the ...\postgresql-11.6.3\bin directory of the postgres version you need them in.
Thank you for sharing your experience @kvroegop. I tried Stack Builder to install PostGIS and both versions offered are for 64bit. I installed the latest one anyway without errors. I then found the postgisgui subfolder but not the libraries, not 32 nor 64 bit version. If you have any help it'd be appreciated. Maybe there is some good reading you can point me to. I am just starting with both Postgres and Timescale so... yeah, chances are I am screwing up somewhere. Thank you.
Finally got the 'ssleay32' and 'libeay32' dll files and fixed the problem following @kvroegop 's suggested steps. Those 2 dlls are actually part of OpenSSL. I got them from indy.fulgan.com. Installing Open SSL didn't work for me. The files didn't come with the install...
i have got the same problem , when i run
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
query , i get
ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/timescaledb-1.6.0.dll": The specified module could not be found.
SQL state: XX000
and this particular dll is there in that location in error messageTry getting 'ssleay32' and 'libeay32' dll files into your postgres bin direcory. You can do this by installing PostGIS and copying those files over from ...\postgresql-11.6.3\bin\postgisgui to the ...\postgresql-11.6.3\bin directory of the postgres version you need them in.
Working for me
Solo una aclaraci贸n. Los archivos 'ssleay32' y 'libeay32 se encuentran en la versi贸n 2.5 del PostGIS. Inicialmente instale la version 3.0 pero en esa version no existem los dlls.
As already mentioned above - copy the DLL's to the *bin* folder rather than to the *lib* one!
(I've hit the same mistake too, so writing it as a reminder for fast readers like myself :) )
i have got the same problem , when i run
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
query , i get
ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/timescaledb-1.6.1.dll": The specified module could not be found.
SQL state: XX000
and this particular dll is there in that location in error message;
already moved 'ssleay32 and libeay32 to the bin Folder and still not working
tried it wit PostgreSQL 11.7 , 11.4
What in the world is going on there ?!
I'm running into the same issue with 1.6.1 on Windows 10.
However, the missing dependencies listed by Dependencies are libssl-1_1-x64.dll and libcrypto-1_1-x64.dll.
So I installed OpenSSL (the missing dependencies are now in the windows system folder) but I still get the same error.
Edit: my bad! Turned out I had postgres 11.1. After upgrading to 11.7, everything worked!
I don't experience this issue with latest PosgreSQL version (12.2 and 11.7) and latest TimescaleDB (1.7). I will close this issue.
Welcome to reopen or request to reopen.
I have the same problem, I have PG11.9 and timescale 1.7.4, I added ssleay32 and libeay32 from PG11.4 to PG11.9's bin, but not able to enable extension, still having the same old error. If you have sorted that, please let me know.
I have the same problem too.
Caused by: org.postgresql.util.PSQLException: ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/timescaledb-1.7.4.dll": The specified module could not be found.
ssleay32 and libeay32 dll already in "C:/Program Files/PostgreSQL/11/bin".


@iskhakovaks In the past, we've sometimes seen this due to permissions error. Were TimescaleDB and Postgres installed with administrator privileges? (Sorry, I haven't used Windows meaningfully in 15+ years, so much less familiar with its current permissions model.)
@mfreed TimescaleDB was installed with administrator privileges. Not sure about Postgres. But I ran Postgres with administrator privileges. The same problem
Installed TimescaleDB 1.7.2 - all the same
Same issue here with pgSQL 12. Everything installed with admin privileges and the extension seems to exist at C:\Program Files\PostgreSQL\12\lib\timescaledb.dll, as well as timescaledb-2.0.0.dll and timescaledb-tsl-2.0.0.dll. However, Postgres can't find the extension.
Most helpful comment
Working for me
And I feel a bit stupid. Per accident I dropped libeay and ssleay in the _lib_ directory, but they should be in the _bin_ directory for the Postgres install. I corrected that and now it works for me.
Edit: Seeing that this issue keeps popping up for Windows based systems, is it possible to add both dll files during installation?