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

luarocks install lapis did not see installed openssl #766

Open
milen-prg opened this issue Apr 29, 2023 · 5 comments
Open

luarocks install lapis did not see installed openssl #766

milen-prg opened this issue Apr 29, 2023 · 5 comments

Comments

@milen-prg
Copy link

Please see here: msys2/MINGW-packages#17041 (comment)
I thought that the problem was with MSYS, but not:

I'm on Windows 10 Pro 64 bit, MSYS2/MINGW64,

I try to install there lua rocks:

luaossl
luacrypto
lapis

The lua packages and mingw-w64-x86_64-openssl are installed, but luarock can't install any lua package with openssl requirements, for example:

mlap@DESKTOP-3SBJLHO MINGW64 ~
$ luarocks install --global luaossl CRYPTO_DIR=/mingw64/
Installing https://luarocks.org/luaossl-20220711-0.src.rock

Error: Could not find library file for CRYPTO
No file libssleay32.dll in C:/msys64/mingw64
No file libssleay32.dll in C:/msys64/mingw64/lib
No file libssleay32.dll in C:/msys64/mingw64/bin
No file libssleay32.dll.a in C:/msys64/mingw64
No file libssleay32.dll.a in C:/msys64/mingw64/lib
No file libssleay32.dll.a in C:/msys64/mingw64/bin
No file ssleay32.dll.a in C:/msys64/mingw64
No file ssleay32.dll.a in C:/msys64/mingw64/lib
No file ssleay32.dll.a in C:/msys64/mingw64/bin
No file libssleay32.a in C:/msys64/mingw64
No file libssleay32.a in C:/msys64/mingw64/lib
No file libssleay32.a in C:/msys64/mingw64/bin
No file ssleay32.dll in C:/msys64/mingw64
No file ssleay32.dll in C:/msys64/mingw64/lib
No file ssleay32.dll in C:/msys64/mingw64/bin
No file ssleay32.lib in C:/msys64/mingw64
No file ssleay32.lib in C:/msys64/mingw64/lib
No file ssleay32.lib in C:/msys64/mingw64/bin
No file matching libssleay32.so.* in C:/msys64/mingw64
No file matching libssleay32.so.* in C:/msys64/mingw64/lib
No file matching libssleay32.so.* in C:/msys64/mingw64/bin
You may have to install CRYPTO in your system and/or pass CRYPTO_DIR or CRYPTO_LIBDIR to the luarock
s command.
Example: luarocks install luaossl CRYPTO_DIR=/usr/local

The REPLY from MSYS is:

"The project is trying to link with older openssl libraries. libeay32.dll and ssleay32.dll was replaced with libcrypto*.dll and libssl*.dll. The issue is not related to luarocks or lua project."

SO, is it possible to use lapis (and all Lua openssl bindings) with new versions of openssl?

@knownasbot
Copy link

I know it's an old issue but I want to share some info.

I had the same problem yesterday and tried everything but nothing seemed to work. I even tried compiling OpenSSL source and passing every include folder I could find (based on other issues) and still nothing. I don't know about C stuff, but I think there's something that conflicts with Windows.

So today I decided to try it on WSL (v1; Ubuntu 22.04) with package libssl-dev installed and it worked fine. After spending many hours trying to make it work, I would like to share this little information for anyone who is tired like me trying to do something.

Check also #489

@milen-prg
Copy link
Author

@knownasbot , most of these problems are exactly because they are developed for linux and nobody supports them for windows.

@izxyz
Copy link

izxyz commented Apr 16, 2024

假设你的OpenSSL路径为“E:\SDK\OpenSSL-Win64”,那么你需要执行下面的操作。
1.创建E:\SDK\OpenSSL-Win64\lib\libeay32.dll的副本,并重命名为libcrypto.dll。
2.创建E:\SDK\OpenSSL-Win64\lib\libssl.dll的副本,名重命名为ssleay32.dll。
3.执行luarocks命令 luarocks install luaossl CRYPTO_DIR=E:\SDK\OpenSSL-Win64 OPENSSL_DIR=E:\SDK\OpenSSL-Win64 --lua-version=5.1。
4.大功告成。

@izxyz
Copy link

izxyz commented Apr 16, 2024

@knownasbot @milen-prg

@karai17
Copy link

karai17 commented Jun 5, 2024

Unsure if this will help on Windows, but when I install Lapis inside of Docker containers, I use the following format:

ARG OPENSSL_DIR="/usr/local/openresty/openssl"
RUN luarocks install lapis \
  CRYPTO_DIR=${OPENSSL_DIR} \
  CRYPTO_INCDIR=${OPENSSL_DIR}/include \
  OPENSSL_DIR=${OPENSSL_DIR} \
  OPENSSL_INCDIR=${OPENSSL_DIR}/include

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants