镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

17.0.1 win10 x64 OpenSSL configuration error #40547

Description

@mortifia

Version

17.0.1

Platform

Microsoft Windows NT 10.0.19043.0 x64

Subsystem

No response

What steps will reproduce the bug?

npm
bug

How often does it reproduce? Is there a required condition?

just install

What is the expected behavior?

to work

What do you see instead?

No response

Additional information

powershell and vscode

Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.

Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6

Impossible de charger le module PSReadline. La console s'exécute sans PSReadline.
PS C:\Users\amela> npm
OpenSSL configuration error:
8C810000:error:80000002:system library:BIO_new_file:No such file or directory:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling fopen(C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
8C810000:error:10000080:BIO routines:BIO_new_file:no such file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
8C810000:error:07000072:configuration file routines:def_load:no such file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:
OpenSSL configuration error:
80440000:error:80000002:system library:BIO_new_file:No such file or directory:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling fopen(C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
80440000:error:10000080:BIO routines:BIO_new_file:no such file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
80440000:error:07000072:configuration file routines:def_load:no such file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:
PS C:\Users\amela>

Activity

  1. added
    opensslIssues and PRs related to the OpenSSL dependency.
    on Oct 21, 2021
  2. iam-frankqiu commented on Oct 21, 2021

    @iam-frankqiu
    Contributor

    Thank you for your report. But could you provide more info about the steps that reproduce the bug?

  3. nassau-t commented on Oct 21, 2021

    @nassau-t

    Same version, and for me it works ok, on Windows.

    It seems there is a problem in your path. Or some configuration.

    Can you execute this on powershell? cmd /c echo %PATH%
    and also this? cmd /c echo %OPENSSL_CONF%

  4. mortifia commented on Oct 22, 2021

    @mortifia
    Author
    Windows PowerShell
    Copyright (C) Microsoft Corporation. Tous droits réservés.
    
    Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6
    
    PS C:\Users\amela> cmd /c echo %PATH%
    C:\Python310\Scripts\;C:\Python310\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\src\flutter\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\PostgreSQL\13\bin;C:\Program Files (x86)\Incredibuild;C:\Users\amela\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\PuTTY\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\kubectl\;C:\Program Files (x86)\stripe;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files\nodejs\;C:\Users\amela\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\amela\AppData\Local\Programs\Python\Python39\;C:\Users\amela\AppData\Local\Microsoft\WindowsApps;C:\Users\amela\AppData\Local\Programs\Microsoft VS Code\bin;C:\tools\dart-sdk\bin;C:\Users\amela\AppData\Roaming\Pub\Cache\bin;C:\Users\amela\AppData\Local\Pub\Cache\bin;C:\Users\amela\.dotnet\tools;C:\Users\amela\AppData\Roaming\npm
    PS C:\Users\amela>
    PS C:\Users\amela>
    PS C:\Users\amela>
    PS C:\Users\amela> cmd /c echo %OPENSSL_CONF%
    C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf
    PS C:\Users\amela>

    ps: with lts all work fine

  5. nassau-t commented on Oct 22, 2021

    @nassau-t

    node v16.x uses openssl v1.1.1, node v17.x uses openssl v3,
    So, perphaps openssl v3 can't work with a openssl 1.x config file.

    In a powershell, try to execute: $env:OPENSSL_CONF = ''
    So, OPENSSL_CONF var will be empty (in that same powershell).
    Then, execute: npm
    It works?

  6. mortifia commented on Oct 22, 2021

    @mortifia
    Author

    it works but it was mainly to prevent that the installer has a problem / forgetfulness

  7. nassau-t commented on Oct 22, 2021

    @nassau-t

    Ok. So I think node v17 is ok.
    The problem is with your environment that has an explicit OPENSSL_CONF. I have Postgres 11 in my machine but OPENSSL_CONF isn't defined. But perhaps there is another program that uses odbc and openssl to connect to Postgres. So, you can undefine that environment variable and look if all other programs work ok, or configure then specific program not using whole system OPENSSL_CONF.

  8. mortifia commented on Oct 23, 2021

    @mortifia
    Author

    what I'm trying to say is that node v17 should not be affected by the configuration of another program (https://www.npmjs.com/package/postgres, or dbeaver)

    this is I find a serious problem because either it works, or it does not work and if it does not work when we have just installed it is that there is a problem (unless there is a configuration to do that is explicitly described)

    the "it's work on my computer" must not exist only the "it's work" must have to exist with an installer

  9. nassau-t commented on Oct 23, 2021

    @nassau-t

    All other programs will be affected if you have a OPENSSL_CONF global variable. Because node loads opensslv3 and openssl3 try to load his config from OPENSSL_CONF. So it is a problem of opensslv3, not really a problem of node.js.
    In fact, the problem is not with the installer, the problem is later, when you try to run npm.
    One solution is to undefine that global variable OPENSSL_CONF. Have you tried to undefine that global variable? All works fine?

    Note that I don't belong to node.js, I only express on my own.

  10. nassau-t commented on Oct 23, 2021

    @nassau-t

    In fact, I have postgres 14, and have tried to install psqlodbc 13 from https://www.postgresql.org/ftp/odbc/versions/msi/
    and it doesn't install any openssl.cnf, not have created any OPENSSL_CONF.

  11. AdamMajer commented on Oct 25, 2021

    @AdamMajer
    Contributor

    Your software is going to be affected by the variables in its environment. OPENSSL_CONF is OpenSSL env variable. All software that uses OpenSSL will use this. So, if you want only your Postgres instance to have it defined, only define it for your Postgres instance and not other software.

    This is not a bug. It's a user misconfiguration.

  12. mortifia commented on Oct 25, 2021

    @mortifia
    Author

    I thought that this problem came from the installer because it is the only one that created this problem for me and for your information I had not created any openssl conf

    but I think I know what the problem is and yes it does not come at all from here (this thing will have me bored until the end)
    the uninstallation is incomplete and its installation poorly done ...

    Sorry for the inconvenience !

  13. nassau-t commented on Oct 25, 2021

    @nassau-t

    Perhaps you don't created the OPENSSL_CONF, but some program have done it. It's not an impossible thing to do what people say to you. But you have to swim against the river. The world is not against you, you are against the rest of the world.

  14. Er4twXz commented on Nov 15, 2021

    @Er4twXz

    I installed postgreSQL14 -- It sets OPENSSL_CONF to C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf

    so I get the same error with nodejs as mentioned in the topic of this issue

    set OPENSSL_CONF= before using node fixes it

    I guess the question is whether its helpful that both programs use the same environment variable

  15. FearlessPixel commented on Nov 19, 2021

    @FearlessPixel

    I ran into the same problem. If NPM doesn't need the variable to be set anyway, why is it completely breaking npm? This is not a case of misconfiguration, I also think it should be fixed or worked around by the NPM/Node team.

  16. nassau-t commented on Nov 19, 2021

    @nassau-t

    The workaround is as Er4twXz said,
    set OPENSSL_CONF= before using node (or npm) fixes it

  17. AdamMajer commented on Nov 19, 2021

    @AdamMajer
    Contributor

    I installed postgreSQL14 -- It sets OPENSSL_CONF to C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf

    Please report this as an error to whoever builds the PostgreSQL 14 package. This is an error that they leak this config parameter to the system. It should only be set to whatever postgres applications require it and nothing else.

    It's not a Node issue that postgres installer breaks your system. Not pointing fingers or anything 😺

  18. FearlessPixel commented on Nov 21, 2021

    @FearlessPixel

    I'll try. You're probably right about it being in the wrong place. However, I'm still curious why a system variable that doesn't seem to affect Node would completely break it.

  19. AdamMajer commented on Nov 21, 2021

    @AdamMajer
    Contributor

    I'll try. You're probably right about it being in the wrong place. However, I'm still curious why a system variable that doesn't seem to affect Node would completely break it.

    It affects ALL software that use OpenSSL. Both Node and PostgreSQL link with OpenSSL. If you install something else that uses OpenSSL, it will get affected by this system variable setting as well

  20. nassau-t commented on Nov 29, 2021

    @nassau-t

    In Windows, If I set
    set OPENSSL_CONF="C:\Program Files\Git\usr\ssl\openssl.cnf" or set OPENSSL_CONF=""
    then node 17.1.0 doesn't start.

    But If I set
    set OPENSSL_CONF=
    It starts.

    You must look how to do the same on Linux.
    Try export OPENSSL_CONF='' or export OPENSSL_CONF= or unset OPENSSL_CONF
    Perhaps the last option, the best.

    Workaround

    Create a mynode file on the PATH (type echo $PATH to see the PATH), and in that file this three lines:

    #!/bin/sh
    unset OPENSSL_CONF
    node $*
    

    Then you must do chmod +x mynode, to be able to run mynode.
    Then simply execute mynode. (If this file is not in your PATH, you can execute it doing ./mynode if it's in the working directory)

    So, this ./mynode -e "console.log('hello!')" should work.

    And you can do the same with npm, creating a file mynpm.

    I don't have a Linux to try, but this is the idea.

  21. lucasantonioc commented on Jan 5, 2022

    @lucasantonioc

    I also had the same problem but I do have postgres installed. Upon checking, I noticed that there was the OPENSSL_CONF environment variable. I just deleted it and it worked for me.

  22. added a commit that references this issue on May 11, 2022
  23. zaidraed commented on Jun 9, 2022

    @zaidraed

    Create a empty file named openssl.cnf in C:\Program Files\PostgreSQL\psqlODBC\etc\ this directory.

    It resolve my problem after creating this empty configuration file in PostgreSQL ODBC.

  24. kirtimukha commented on Aug 30, 2022

    @kirtimukha

    @zaidraed It works~!!! Thank you.
    I was very frustrated cause any of above, didn't work.
    Finally got a solution from you. Thank you!!

  25. alihdev commented on Feb 7, 2024

    @alihdev

    @zaidraed It works~!!! Thank you. ++

  26. ethanpaltjon commented on Aug 20, 2024

    @ethanpaltjon

    Same version, and for me it works ok, on Windows.

    It seems there is a problem in your path. Or some configuration.

    Can you execute this on powershell? cmd /c echo %PATH% and also this? cmd /c echo %OPENSSL_CONF%

    I am getting a similar error as @mortifia had, but did not have a similar output to @nassau-t 's question. Similarly, the solutions that have been suggested did not work. Both npm and Node are installed. Do y'all have an idea on what I could try next? My output to @nassau-t 's question is below:

    PS C:\Users\ethan> cmd /c echo %PATH%
    C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\HP\HP One Agent;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\ethan\AppData\Local\Programs\Python\Launcher\;C:\Users\ethan\AppData\Local\Microsoft\WindowsApps;C:\msys64\ucrt64\bin;C:\Users\ethan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts;C:\Program Files\Azure Data Studio\bin;C:\Users\ethan\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ethan\AppData\Local\Programs\Python\Python312\Scripts;C:\Users\ethan\AppData\Roaming\npm
    PS C:\Users\ethan> cmd /c echo %OPENSSL_CONF%
    %OPENSSL_CONF%
    
  27. nassau-t commented on Aug 21, 2024

    @nassau-t

    Try to set OPENSSL_CONF to some directory, and create there an empty openssl.cnf file.
    Or look for openssl.conf file and rename it to .bad (perhaps it is on C:\windows\System32\OpenSSH)

  28. ethanpaltjon commented on Aug 23, 2024

    @ethanpaltjon

    Thank you for the suggestion! It didn't end up working, as the error turned out to be with the version of npm that I was using instead of the OPENSSL_CONF. For anyone that runs into a similar issue when trying to use create-react-app, follow the following steps to solve the error:

    1. run npm i -g npm@latest
    2. run npm uninstall -g create-react-app
    3. run npx create-react-app@5.0.1 ds-web-app

    Your web app should be built. If it isn't, check that 5.0.1 is the latest version of npm and check the following resources below:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    opensslIssues and PRs related to the OpenSSL dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions