Skip to content
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

Trouble finding extension on Windows #1613

Open
yebidaxiong opened this issue Jan 7, 2020 · 43 comments
Open

Trouble finding extension on Windows #1613

yebidaxiong opened this issue Jan 7, 2020 · 43 comments
Labels
build Issues related to building TimescaleDB or using its binaries docs-needed The issue or pull request requires documentation update unsupported-pg PG11 and below not supported anymore windows

Comments

@yebidaxiong
Copy link

Bug report on Windows 10 x64
Postgre 11.6
timescaledb 1.5.1

Relevant system information:

  • OS: [e.g. Ubuntu 16.04, Windows 10 x64, etc]
  • PostgreSQL version (output of postgres --version): [e.g. 10.5, 9.6.10]
  • TimescaleDB version (output of \dx in psql): [e.g. 1.0.0]
  • Installation method: [e.g., "using Docker", "apt install", "source"]

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

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.

@kvroegop
Copy link

kvroegop commented Jan 9, 2020

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

  1. Do a fresh installation of Postgres 11.6.3 (I had no previous version to uprade)
  2. Install TimescaleDB 1.5.1 as stated on the install page (including all suggested optimizations)
  3. Create a standard database (either via CLI or pgAdmin)
  4. Create the extension for said database (either via CLI or pgAdmin)

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.
image

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).
image

@k-rus
Copy link
Contributor

k-rus commented Jan 9, 2020

@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?

@kvroegop
Copy link

kvroegop commented Jan 9, 2020

@k-rus
I did the following things with still the same result:

  • Set the service to use the sysadmin credentials to run (reverted after trying)
  • Set full write access for all users to the timescale dll-files
  • Set full write access for all users to the 'libs' directory and the files in the directory

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.

@k-rus
Copy link
Contributor

k-rus commented Jan 9, 2020

Thanks for checking if it is a permission error.
Can you look if discussion in #1458 helps?

@kvroegop
Copy link

kvroegop commented Jan 9, 2020

Alright, I've done some dependency checkingg with Dependencies (https://github.com/lucasg/Dependencies) only to get to the following result.
image
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.

@kvroegop
Copy link

kvroegop commented Jan 9, 2020

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?

@k-rus
Copy link
Contributor

k-rus commented Jan 9, 2020

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.

@krisavi
Copy link

krisavi commented Jan 16, 2020

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.

@Serjohn27
Copy link

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

@kvroegop
Copy link

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.

@ecarceller
Copy link

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.

@ecarceller
Copy link

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...

@v-uy
Copy link

v-uy commented Feb 25, 2020

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.

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.

@new-mikha
Copy link

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 :) )

@3242433424
Copy link

3242433424 commented Mar 19, 2020

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 ?!

@quixotik
Copy link

quixotik commented Mar 23, 2020

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!

@k-rus
Copy link
Contributor

k-rus commented Apr 28, 2020

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.

@k-rus k-rus closed this as completed Apr 28, 2020
@k-rus k-rus added build Issues related to building TimescaleDB or using its binaries and removed Install labels May 7, 2020
@rishikesan-vunet
Copy link

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.

@iskhakovaks
Copy link

iskhakovaks commented Nov 27, 2020

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".

image

image

@mfreed mfreed changed the title "D:/PostgreSQL/lib/timescaledb-1.5.1.dll": The specified module could not be found. Trouble finding extension on Windows Nov 29, 2020
@mfreed
Copy link
Member

mfreed commented Nov 29, 2020

@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 mfreed reopened this Nov 29, 2020
@iskhakovaks
Copy link

iskhakovaks commented Nov 30, 2020

@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

@komodovaran
Copy link

komodovaran commented Jan 27, 2021

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.

@Bialomazur
Copy link

Bialomazur commented May 25, 2021

I'm having the exact same issue as described by @komodovaran on Windows 10 & have followed all listed "solution"-proceedures and the Extension is still unable to find the dll.

@mfundul
Copy link
Contributor

mfundul commented May 31, 2021

@komodovaran @Bialomazur I have followed the steps of this guide to install timescaledb next to postgreSQL 12, which I installed using the EDB interactive installer. It was a clean install and I have failed to reproduce the issue.

Can you provide me detailed information on what steps you followed and how you installed timescaledb?

@NunoFilipeSantos NunoFilipeSantos added the unsupported-pg PG11 and below not supported anymore label Oct 1, 2021
@NunoFilipeSantos
Copy link
Contributor

@yebidaxiong @komodovaran and @Bialomazur closing the issue, feel free to reopen it if you encounter it on TimescaleDB 2.4.2 with PG12 or 13.

@tbsfchnr
Copy link

tbsfchnr commented Dec 23, 2021

Hi, I've read through the thread several times, trying all solutions - still no luck. I've re-installed postgres from scratch as administrator, following

the steps of this guide

as suggested by @mfundul.

I'm using timescaledb 2.5.1, Windows 10, Postgresql 13.5. Running into the same error:

example=# CREATE EXTENSION IF NOT EXISTS timescaledb;
ERROR: could not load library "C:/Program Files/PostgreSQL/13/lib/timescaledb-2.5.0.dll": The specified procedure could not be found.

@mfundul
Copy link
Contributor

mfundul commented Dec 23, 2021

That URL doesn't work anymore, the documentation has moved since May. The new URL should be this.

It's strange that you are using 2.5.1 and the error is about timescaledb-2.5.0.dll.

You could try being explicit with enabling the extension in your database:

CREATE EXTENSION IF NOT EXISTS timescaledb WITH VERSION "2.5.1";

@draustin
Copy link

I observed this issue on Windows 10, PostgreSQL 15.2 installed from EDB, TimescaleDB 2.10.0.

example=# create extension if not exists timescaledb;
ERROR:  could not load library "C:/Program Files/PostgreSQL/15/lib/timescaledb-2.10.0.dll": The specified module could not be found.

Using the "Application Stack Builder" that was installed alongside PostgreSQL, installed PostGIS and restarted the service. This fixed the problem.

@tlf30
Copy link

tlf30 commented Feb 26, 2023

I am seeing the same issue with PostgreSQL 15.2 on Windows 10 also installed from the EDB installer and timescale 2.10.0.
I do not have GIS installed and a restart of the service did not fix it.

EDIT: I can confirm installing PostGIS fixes the issue.

@zhenglin-charlie-li
Copy link

@tlf30 thanks for sharing. installing PostGIS works for me too. here is the more detailed steps: https://postgis.net/workshops/postgis-intro/installation.html

@rodrigofmarques
Copy link

rodrigofmarques commented Apr 27, 2023

As @draustin, @tlf30 and @ZhengLin-Li, installing PostGIS works for me too.

@agarciagan
Copy link

agarciagan commented Jun 7, 2023

Last week I was able to install Timescale on Windows installing PostGIS. This week, on a different Windwos server, installing PostGIS did not resolve the error. I check differences between both computers and PostGIS has been updated from 3.3.2 to 3.3.3.

Installing PostGIS 3.3.2 ( setup.exe downloaded from https://download.osgeo.org/postgis/windows/pg15/archive/ solved the issue.

I do not know differences between PostGIS versions, but until the bug is solved, install PostGIS 3.3.2 if you want to use TimescaleDB on windows

@Svyatya
Copy link

Svyatya commented Jun 22, 2023

I confirm, if you faced this problem, installed PostGIS and problem stayed, check the version. With PostGIS 3.3.2 everything stated to work.

@boings
Copy link

boings commented Feb 14, 2024

Same thing fixed it for me with PG 16.2 and TimeScaleDB 2.14

@tlf30
Copy link

tlf30 commented Feb 16, 2024

@NunoFilipeSantos this issue should really be reopened. A fix needs to be implemented.

@mhalhead
Copy link

I hit the same issue installing Timescaledb 2.14.2 with Postgres 16.2 on Windows 10 (handy workstation for testing). All the noted dependencies in the documentation where installed (OpenSSL 3.2.1 and VC redistributables)

I can resolve the problem by installing Postgis 3.3.2. Installing Postgis 3.4 does not fix the issue. There is clearly a missing dependency. I haven't had time to dig into the difference between the two GIS versions nor look at the Timescaledb dependencies.

@mkindahl
Copy link
Contributor

Reopening. This seems to mainly be a documentation issue.

@mkindahl mkindahl reopened this Feb 22, 2024
@mkindahl mkindahl added the docs-needed The issue or pull request requires documentation update label Feb 22, 2024
@Mike31120
Copy link

Mike31120 commented Mar 18, 2024

Hi ! I faced the same issue with PG 16.2 + TimescalDB 2.14.2 , now it's solved after having installed postgis-bundle-pg15x64-setup-3.3.2-2.exe on my windows laptop. Just be careful during the install process to select the right PG folder (16 instead of 15).

@Liandrel
Copy link

Liandrel commented Mar 20, 2024

Hi, faced same issue with PG 16.2, installing postgis 3.3.2 fixes the issue can confirm

@Parzi68
Copy link

Parzi68 commented Mar 21, 2024

Hi, faced the same issue with PostgreSQL 16.2 + TimescalDB 2.14.2, installing PostGIS 3.3.2 (postgis-bundle-pg15x64-setup-3.3.2-2.exe) from https://download.osgeo.org/postgis/windows/pg15/archive/ solved the issue... No need to add .dll files to the
/bin folder, at the time of installing PostGIS make sure to select the right Postgres folder i.e. 16 intead of 15.

@zerlei
Copy link

zerlei commented Apr 8, 2024

Hi, faced the same issue with PostgreSQL 16.2 + TimescalDB 2.14.2, installing PostGIS 3.3.2 (postgis-bundle-pg15x64-setup-3.3.2-2.exe) from https://download.osgeo.org/postgis/windows/pg15/archive/ solved the issue... No need to add .dll files to the /bin folder, at the time of installing PostGIS make sure to select the right Postgres folder i.e. 16 intead of 15.

Thank you, It solves my problem, but why?😂

@tlf30
Copy link

tlf30 commented Apr 9, 2024

@mkindahl I do not think this is a documentation issue. It seems to me that there is a dependency problem in timescaledb when installing on Windows. Without diving into detail, I think PostGIS is just installing the dependency that is needed.

@Parzi68
Copy link

Parzi68 commented May 1, 2024

Hi, faced the same issue with PostgreSQL 16.2 + TimescalDB 2.14.2, installing PostGIS 3.3.2 (postgis-bundle-pg15x64-setup-3.3.2-2.exe) from https://download.osgeo.org/postgis/windows/pg15/archive/ solved the issue... No need to add .dll files to the /bin folder, at the time of installing PostGIS make sure to select the right Postgres folder i.e. 16 intead of 15.

Thank you, It solves my problem, but why?😂

just like @tlf30 said, it solves the dependency issue 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to building TimescaleDB or using its binaries docs-needed The issue or pull request requires documentation update unsupported-pg PG11 and below not supported anymore windows
Projects
None yet
Development

No branches or pull requests