Failed to Install APISIX-2.3 from RPM Package
Issue description
Failed to install APISIX from rpm package. The exception reported as following when I try to start APISIX:
$ sudo apisix start
/usr/local/openresty/luajit/bin/luajit /usr/local/apisix/apisix/cli/apisix.lua start
/usr/local/openresty/luajit/bin/luajit: error loading module 'ssl.core' from file '/usr/local/apisix/deps/lib/lua/5.1/ssl.so':
libssl.so.1.1: cannot open shared object file: No such file or directory
stack traceback:
[C]: at 0x004546a0
[C]: in function 'require'
/usr/local/apisix/deps/share/lua/5.1/ssl.lua:8: in main chunk
[C]: in function 'require'
/usr/local/apisix/deps/share/lua/5.1/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/etcd.lua:23: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/ops.lua:18: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/apisix.lua:33: in main chunk
[C]: at 0x00404d60
Environment
- apisix version: apisix-2.3-0.x86_64
- OS: Linux centos7.dechen.com 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- OpenResty / Nginx version: nginx version: openresty/1.19.3.1
- etcd version: etcd Version: 3.4.13
- apisix-dashboard version, if have:
Minimal test code / Steps to reproduce the issue
- Install OpenResty:
$ sudo yum install -y wget
$ wget https://openresty.org/package/centos/openresty.repo
$ sudo mv openresty.repo /etc/yum.repos.d/
$ sudo yum check-update -y
$ sudo yum install openresty -y
$ sudo yum install -y openresty-resty
$ openresty -v
nginx version: openresty/1.19.3.1
- Install ETCD
$ wget https://github.com/etcd-io/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-amd64.tar.gz
$ tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
cd etcd-v3.4.13-linux-amd64 && \
sudo cp -a etcd etcdctl /usr/bin/
$ nohup etcd &
$ ps aux | grep etcd
dominic 1576 0.5 1.0 10610476 18792 pts/0 Sl 00:24 0:00 etcd
dominic 1585 0.0 0.0 112812 976 pts/0 S+ 00:24 0:00 grep --color=auto etcd
$ etcd --version
etcd Version: 3.4.13
Git SHA: ae9734ed2
Go Version: go1.12.17
Go OS/Arch: linux/amd64
- Install APISIX
$ sudo yum install -y https://github.com/apache/apisix/releases/download/2.3/apisix-2.3-0.x86_64.rpm
$ sudo apisix start
/usr/local/openresty/luajit/bin/luajit /usr/local/apisix/apisix/cli/apisix.lua start
/usr/local/openresty/luajit/bin/luajit: error loading module 'ssl.core' from file '/usr/local/apisix/deps/lib/lua/5.1/ssl.so':
libssl.so.1.1: cannot open shared object file: No such file or directory
stack traceback:
[C]: at 0x004546a0
[C]: in function 'require'
/usr/local/apisix/deps/share/lua/5.1/ssl.lua:8: in main chunk
[C]: in function 'require'
/usr/local/apisix/deps/share/lua/5.1/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/etcd.lua:23: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/ops.lua:18: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/apisix.lua:33: in main chunk
[C]: at 0x00404d60
What's the actual result? (including assertion message & call stack if applicable)
$ sudo apisix start
/usr/local/openresty/luajit/bin/luajit /usr/local/apisix/apisix/cli/apisix.lua start
/usr/local/openresty/luajit/bin/luajit: error loading module 'ssl.core' from file '/usr/local/apisix/deps/lib/lua/5.1/ssl.so':
libssl.so.1.1: cannot open shared object file: No such file or directory
stack traceback:
[C]: at 0x004546a0
[C]: in function 'require'
/usr/local/apisix/deps/share/lua/5.1/ssl.lua:8: in main chunk
[C]: in function 'require'
/usr/local/apisix/deps/share/lua/5.1/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/etcd.lua:23: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/ops.lua:18: in main chunk
[C]: in function 'require'
/usr/local/apisix/apisix/cli/apisix.lua:33: in main chunk
[C]: at 0x00404d60
What's the expected result?
It seems that the openresty you installed still lacks dependencies, you can refer to the openresty installation steps here. It should solve your problem. https://github.com/apache/apisix/blob/master/doc/install-dependencies.md#centos-7
It seems that the openresty you installed still lacks dependencies, you can refer to the openresty installation steps here. It should solve your problem. https://github.com/apache/apisix/blob/master/doc/install-dependencies.md#centos-7
Which dependency is missing?
Which dependency is missing?
Judging from the error message and the openresty installation information provided, this should be the lack of openssl. Secondly, I did not reproduce this problem.
Which dependency is missing?
Judging from the error message and the openresty installation information provided, this should be the lack of
openssl. Secondly, I did not reproduce this problem.
Did you follow the steps of this issue?
Did you follow the steps of this issue?
Sorry, I did not follow this step. I only tried the installation steps of apisix.
Thank you all for following this issue.
I've tried many times in CentOS 7 with both hypervisor VirtualBox hosted on Ubuntu 20.04 and VMware Workstation hosted on Windows 10. I've never been successful. My OS environment is much clear with minimal installation. It's even no wget. I don't know which dependencies are missing.
Thank you all for following this issue.
I've tried many times in CentOS 7 with both hypervisor VirtualBox hosted on Ubuntu 20.04 and VMware Workstation hosted on Windows 10. I've never been successful. My OS environment is much clear with minimal installation. It's even no wget. I don't know which dependencies are missing.
By the way, I just installed the previous version apisix-2.2-0.x86_64.rpm. It works for me. At least, no error was reported to me as following:
$ sudo apisix start
nginx: [emerg] invalid port in resolver "fddc:4d2:c510::1" in /usr/local/apisix/conf/nginx.conf:75
$ sudo vim /etc/resolv.conf
# removed the IP v6 item from the file `/etc/resolv.conf`
$ sudo apisix start
$ ss -tnpl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 100 127.0.0.1:25 *:*
LISTEN 0 128 127.0.0.1:9090 *:*
LISTEN 0 128 *:9443 *:*
LISTEN 0 128 127.0.0.1:2379 *:* users:(("etcd",pid=44051,fd=6))
LISTEN 0 128 127.0.0.1:2380 *:* users:(("etcd",pid=44051,fd=5))
LISTEN 0 128 *:22 *:*
LISTEN 0 128 *:9080 *:*
LISTEN 0 100 [::1]:25 [::]:*
LISTEN 0 128 [::]:9443 [::]:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 128 [::]:9080 [::]:*
$
I met the same problem, after rpm -ivh openresty-openssl-xxx.rpm, It's OK, can download from openresty-openssl.
@apchee Since from version 2.3, Apache APISIX needs to be installed OpenSSL develop library first to start.
RPM package(only for CentOS 7)
Installation runtime dependencies: OpenResty, etcd and OpenSSL develop library, refer to install dependencies documentation
docker image apisix:2.3-centos got same error
要先安装 sudo apt-get install libssl-dev
@apchee Since from version 2.3, Apache APISIX needs to be installed OpenSSL develop library first to start.
RPM package(only for CentOS 7) Installation runtime dependencies: OpenResty, etcd and OpenSSL develop library, refer to install dependencies documentation
@idbeta and @belongwqz, thank you for your pointing this out.
But I don't think it's a good solution that the OpenSSL development library must be installed in PROD.
If it's an known issue, can we mark it at a conspicuous position?
Fixed!
@idbeta and @belongwqz, thank you for your pointing this out.
But I don't think it's a good solution that the OpenSSL development library must be installed in PROD.
If it's an known issue, can we mark it at a conspicuous position?
Agree, there should be a better way to solve this.
docker image
apisix:2.3-centosgot same error
Do you submit another issue? ping @gxthrj
@membphis we need to fix it in high priority
build a new RPM package, add new dependencies openresty-openssl
@idbeta would you like to handle this issue? many thx
build a new RPM package, add new dependencies
openresty-openssl@idbeta would you like to handle this issue? many thx
sure, I will submit the new rpm package and deb package later.
@apchee https://github.com/apache/apisix/releases/tag/2.3
We have uploaded the new packages (rpm and deb packages) and added the dependency library openresty-openssl.
@idbeta you can make a try when you have time
and we need to update the doc.
