You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/13 15:13:57 UTC
[GitHub] [apisix] kwanhur commented on issue #4502: bug: No file openssl/ssl.h in /usr/local/openresty/openssl/include
kwanhur commented on issue #4502:
URL: https://github.com/apache/apisix/issues/4502#issuecomment-1038185588
Unlikely, I got this trouble :-(
1. I had installed (via RPM repository)[https://github.com/apache/apisix/blob/master/docs/en/latest/how-to-build.md#installation-via-rpm-repositorycentos-7], this got `openresty` and `apache apisix`, like:
```bash
[vagrant@lvs apisix]$ rpm -aq|grep apisix
apisix-base-1.19.9.1.3-0.el7.x86_64
apache-apisix-repo-1.0-1.noarch
apisix-2.12.0-0.el7.x86_64
[vagrant@lvs apisix]$ rpm -aq|grep openresty
openresty-pcre-8.44-1.el7.x86_64
openresty-zlib-1.2.11-3.el7.centos.x86_64
openresty-openssl111-1.1.1l-1.el7.x86_64
```
2. I cloned apisix source and `make deps`, logs lay [here](https://gist.github.com/kwanhur/68fc612700294e3b48a43d57a3beb1d1) got failure:
```bash
apisix master-0 depends on luasec 0.9-1 (not installed)
Installing https://luarocks.org/luasec-0.9-1.src.rock
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/openresty/openssl111/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] Error 1
```
3. I did `./utils/install-dependencies.sh`, unfortunately, install `$common_dep` failed:
- existed `apache-apisix-repo-1.0-1.noarch` conflicts with this installation
```bash
[vagrant@lvs apisix]$ ./utils/install-dependencies.sh
+ main
++ uname -s
++ tr '[:upper:]' '[:lower:]'
+ OS_NAME=linux
+ [[ 0 == 0 ]]
+ [[ linux == \l\i\n\u\x ]]
+ multi_distro_installation
+ grep -Eqi CentOS /etc/issue
+ grep -Eq CentOS /etc/centos-release /etc/os-release /etc/redhat-release /etc/system-release
+ install_dependencies_with_yum centos
+ sudo yum install -y yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version
Nothing to do
+ local 'common_dep=curl git gcc openresty-openssl111-devel unzip pcre pcre-devel openldap-devel'
+ '[' centos == centos ']'
+ sudo yum install -y https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm
Loaded plugins: fastestmirror
apache-apisix-repo-1.0-1.noarch.rpm | 2.6 kB 00:00:00
Examining /var/tmp/yum-root-arpfF4/apache-apisix-repo-1.0-1.noarch.rpm: apache-apisix-repo-1.0-1.noarch
/var/tmp/yum-root-arpfF4/apache-apisix-repo-1.0-1.noarch.rpm: does not update installed package.
Error: Nothing to do
```
solution: modify `utils/install-dependencies.sh` ignore installed package `apache-apisix-repo-1.0-1.noarch` and redo `./utils/install-dependencies.sh multi_distro_installation`, then `make deps` get off this trouble
```bash
[vagrant@lvs apisix]$ git diff utils/install-dependencies.sh
diff --git a/utils/install-dependencies.sh b/utils/install-dependencies.sh
index 3662326..b152bb2 100755
--- a/utils/install-dependencies.sh
+++ b/utils/install-dependencies.sh
@@ -49,7 +49,7 @@ function install_dependencies_with_yum() {
local common_dep="curl git gcc openresty-openssl111-devel unzip pcre pcre-devel openldap-devel"
if [ "${1}" == "centos" ]; then
# add APISIX source
- sudo yum install -y https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm
+ rpm -q --quiet apache-apisix-repo-1.0-1.noarch || sudo yum install -y https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm
# install apisix-base and some compilation tools
# shellcheck disable=SC2086
```
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org