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

fix: install dependencies issues #7092

Merged
merged 3 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function install_dependencies_with_aur() {
function install_dependencies_with_yum() {
sudo yum install -y yum-utils

local common_dep="curl git gcc openresty-openssl111-devel unzip pcre pcre-devel openldap-devel"
local common_dep="curl wget git gcc openresty-openssl111-devel unzip pcre pcre-devel openldap-devel"
tzssangglass marked this conversation as resolved.
Show resolved Hide resolved
if [ "${1}" == "centos" ]; then
# add APISIX source
local apisix_pkg=apache-apisix-repo-1.0-1.noarch
Expand Down
8 changes: 8 additions & 0 deletions utils/linux-install-luarocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,13 @@ if [ -d ${OPENRESTY_PREFIX}/openssl111 ]; then
OPENSSL_PREFIX=${OPENRESTY_PREFIX}/openssl111
fi

FOUND_PATH=$(echo "${PATH}" | grep -oP '(?<=:|)/usr/local/bin(?=:|)') || true
if [[ "${FOUND_PATH}" == "" ]]; then
echo "the path /usr/local/bin is not included in the system default PATH variable, add PATH variable in ~/.bashrc."
echo "export PATH=$PATH:/usr/local/bin" >> ~/.bashrc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave bashrc untouched and only update $PATH for this shell? Just warn the user to modify $PATH by themselves as they may not use bash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

# shellcheck disable=SC1090
source ~/.bashrc
fi

luarocks config variables.OPENSSL_LIBDIR ${OPENSSL_PREFIX}/lib
luarocks config variables.OPENSSL_INCDIR ${OPENSSL_PREFIX}/include