Caelebs opened a new issue #3886:
URL: https://github.com/apache/apisix/issues/3886


   ### Issue description
   
   When I compiled and installed apisix2.4, I executed `make deps` and prompted 
"Could not find header file for OPENSSL"
   The complete error message is as follows
   ```
   Error: Failed installing dependency: 
https://luarocks.org/luasec-0.9-1.src.rock - Could not find header file for 
OPENSSL
     No file openssl/ssl.h in /usr/local/include
     No file openssl/ssl.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 luasec OPENSSL_DIR=/usr/local
   make: *** [deps] 
   ```
   I checked that openssl is installed, Including openresty-openssl111
   ```
   [root@TEST3 /0322/23/apisix] -> rpm -qa | grep -i openresty
   openresty-openssl111-devel-1.1.1i-1.el7.x86_64
   openresty-zlib-1.2.11-3.el7.centos.x86_64
   openresty-pcre-8.44-1.el7.x86_64
   openresty-openssl111-1.1.1i-1.el7.x86_64
   openresty-1.17.8.2-1.el7.x86_64
   ```
   ```
   [root@TEST3 /0322/23/apisix] -> find / -name ssl.h
   /root/.cache/node-gyp/12.16.1/include/node/openssl/ssl.h
   /usr/local/openresty/openssl111/include/openssl/ssl.h
   /opt/node-v12.16.1-linux-x64/include/node/openssl/ssl.
   ```
   According to the error, I executed `luarocks install luasec 
OPENSSL_DIR=/usr/local`, and modified OPENSSL_DIR to 
`/usr/local/openresty/openssl111/`, this step can be successful, But subsequent 
execution of `make deps` will still prompt the same error, So what should I do 
now?
   
   ```
   [root@TEST3 /0322/23/apisix] -> luarocks install luasec 
OPENSSL_DIR=/usr/local/openresty/openssl111/
   Installing https://luarocks.org/luasec-1.0-1.src.rock...
   Using https://luarocks.org/luasec-1.0-1.src.rock... switching to 'build' mode
   gcc -O2 -fPIC -I/usr/include -c src/options.c -o src/options.o 
-DWITH_LUASOCKET -DLUASOCKET_DEBUG -I/usr/local/openresty/openssl111/include 
-Isrc/ -Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/config.c -o src/config.o 
-DWITH_LUASOCKET -DLUASOCKET_DEBUG -I/usr/local/openresty/openssl111/include 
-Isrc/ -Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/ec.c -o src/ec.o -DWITH_LUASOCKET 
-DLUASOCKET_DEBUG -I/usr/local/openresty/openssl111/include -Isrc/ 
-Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/x509.c -o src/x509.o -DWITH_LUASOCKET 
-DLUASOCKET_DEBUG -I/usr/local/openresty/openssl111/include -Isrc/ 
-Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/context.c -o src/context.o 
-DWITH_LUASOCKET -DLUASOCKET_DEBUG -I/usr/local/openresty/openssl111/include 
-Isrc/ -Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/ssl.c -o src/ssl.o -DWITH_LUASOCKET 
-DLUASOCKET_DEBUG -I/usr/local/openresty/openssl111/include -Isrc/ 
-Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/luasocket/buffer.c -o 
src/luasocket/buffer.o -DWITH_LUASOCKET -DLUASOCKET_DEBUG 
-I/usr/local/openresty/openssl111/include -Isrc/ -Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/luasocket/io.c -o src/luasocket/io.o 
-DWITH_LUASOCKET -DLUASOCKET_DEBUG -I/usr/local/openresty/openssl111/include 
-Isrc/ -Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/luasocket/timeout.c -o 
src/luasocket/timeout.o -DWITH_LUASOCKET -DLUASOCKET_DEBUG 
-I/usr/local/openresty/openssl111/include -Isrc/ -Isrc/luasocket
   gcc -O2 -fPIC -I/usr/include -c src/luasocket/usocket.c -o 
src/luasocket/usocket.o -DWITH_LUASOCKET -DLUASOCKET_DEBUG 
-I/usr/local/openresty/openssl111/include -Isrc/ -Isrc/luasocket
   gcc -shared -o ssl.so -L/usr/lib64/lua src/options.o src/config.o src/ec.o 
src/x509.o src/context.o src/ssl.o src/luasocket/buffer.o src/luasocket/io.o 
src/luasocket/timeout.o src/luasocket/usocket.o 
-L/usr/local/openresty/openssl111/lib 
-Wl,-rpath,/usr/local/openresty/openssl111/lib: -lssl -lcrypto
   Updating manifest for /usr/lib64/luarocks/rocks
   luasec 1.0-1 is now built and installed in /usr (license: MIT)
   ```
   
   ### Environment
   * apisix version (cmd: `apisix version`): `2.4`
   * OS (cmd: `uname -a`): `CentOS Linux release 7.6.1810 (Core)`
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 
`openresty/1.17.8.2`
   * etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to