nokia / kong-oidc

OIDC plugin for Kong
Apache License 2.0
454 stars 321 forks source link

Failed to install #45

Closed shlomiken closed 6 years ago

shlomiken commented 6 years ago

Hi i'm preparing a docker image that contains OIDC plugin and the luarocks fails to install the rock. any help would be appreciated. Shlomi Warning: Failed searching manifest: Failed extracting manifest file Installing https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/kong-oidc-1.0.4-0.src.rock

Trojan295 commented 6 years ago

Hello, Looks you are missing unzip in the container, cause it's necessary to unpack the Luarocks packages. Try to install unzip before using LuaRocks. Maybe also git will be required.

shlomiken commented 6 years ago

Hi i installed unzip , now i got this (openssl headers) lua-resty-openidc 1.4.0-1 depends on lua-resty-hmac (not installed) Installing https://luarocks.org/lua-resty-hmac-v1.0-1.rockspec Missing dependencies for lua-resty-hmac v1.0-1: luacrypto (not installed)

lua-resty-hmac v1.0-1 depends on luacrypto (not installed) Installing https://luarocks.org/luacrypto-0.3.2-2.src.rock

Error: Failed installing dependency: https://luarocks.org/lua-resty-openidc-1.4.0-1.src.rock - Failed installing dependency: https://luarocks.org/lua-resty-hmac-v1.0-1.rockspec - Failed installing dependency: https://luarocks.org/luacrypto-0.3.2-2.src.rock - Could not find header file for OPENSSL No file openssl/evp.h in /usr/local/include No file openssl/evp.h in /usr/include You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command. Example: luarocks install luacrypto OPENSSL_DIR=/usr/local sh-4.2#

shlomiken commented 6 years ago

i also see that in the kong docker luassl is already installed , while this library dependent somehow on luacrypto - which fail to compile.

Trojan295 commented 6 years ago

Can you try to install OpenSSL development package libssl-dev?

shlomiken commented 6 years ago

i did (both sslib-dev and openssl-devel) none did work. the problem is that openrest works with openssl 1.0 (i believe) and i have openssl 1.1

after installing devel - i get this compilation error. Error: Failed installing dependency: https://luarocks.org/lua-resty-openidc-1.4.0-1.src.rock - Failed installing dependency: https://luarocks.org/lua-resty-hmac-v1.0-1.rockspec - Failed installing dependency: https://luarocks.org/luacrypto-0.3.2-2.src.rock - Build error: Failed compiling object src/lcrypto.o

Trojan295 commented 6 years ago

I got it working by installing the following packages before installing kong-oidc:

RUN apk add gcc libc-dev git openssl-dev

I believe you can remove gcc and git at the end of the Dockerfile to save space.

shlomiken commented 6 years ago

i see your did it on alpine version - i'm using the centos kong docker 0.13

On Wed, May 16, 2018 at 12:17 PM, Damian Czaja notifications@github.com wrote:

I got it working by installing the following packages before installing kong-oidc:

RUN apk add gcc libc-dev git openssl-dev

I believe you can remove gcc and git at the end of the Dockerfile to save space.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nokia/kong-oidc/issues/45#issuecomment-389452536, or mute the thread https://github.com/notifications/unsubscribe-auth/AfS4tVEYYXAhYe6IvKF5CUxEUMzoYi53ks5ty-6TgaJpZM4T8-r7 .

-- This e-mail, as well as any attached document, may contain material which is confidential and privileged and may include trademark, copyright and other intellectual property rights that are proprietary to Kenshoo Ltd,   its subsidiaries or affiliates ("Kenshoo"). This e-mail and its attachments may be read, copied and used only by the addressee for the purpose(s) for which it was disclosed herein. If you have received it in error, please destroy the message and any attachment, and contact us immediately. If you are not the intended recipient, be aware that any review, reliance, disclosure, copying, distribution or use of the contents of this message without Kenshoo's express permission is strictly prohibited.

shlomiken commented 6 years ago

ok i managed to continue - (using apk fetch) but there are several wrongs here. need git + gcc to be able to install on alpine. centos does not work - since it has openssl 1.1 and not 1.0 (like alpine does)