You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2021/02/05 16:01:16 UTC

[apisix] branch master updated: chore: fixed install luarocks (#3536)

This is an automated email from the ASF dual-hosted git repository.

membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 004f95a  chore: fixed install luarocks (#3536)
004f95a is described below

commit 004f95abe8b88a509a8135ab7e380f313927dce0
Author: idbeta <id...@gmail.com>
AuthorDate: Sat Feb 6 00:01:08 2021 +0800

    chore: fixed install luarocks (#3536)
    
    close #3529
---
 doc/install-dependencies.md       | 8 ++++----
 doc/zh-cn/install-dependencies.md | 8 ++++----
 utils/linux-install-luarocks.sh   | 3 +--
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/doc/install-dependencies.md b/doc/install-dependencies.md
index bd1f612..542f197 100644
--- a/doc/install-dependencies.md
+++ b/doc/install-dependencies.md
@@ -56,7 +56,7 @@ sudo yum-config-manager --add-repo https://openresty.org/package/centos/openrest
 sudo yum install -y openresty curl git gcc openresty-openssl-devel unzip
 
 # install LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # start etcd server
 nohup etcd &
@@ -79,7 +79,7 @@ tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
 sudo yum install -y openresty curl git gcc openresty-openssl-devel
 
 # install LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # start etcd server
 nohup etcd &
@@ -105,7 +105,7 @@ tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
 sudo apt-get install -y git openresty curl openresty-openssl-dev
 
 # install LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # start etcd server
 nohup etcd &
@@ -136,7 +136,7 @@ tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
 sudo apt-get install -y git openresty curl make openresty-openssl-dev
 
 # install LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # start etcd server
 nohup etcd &
diff --git a/doc/zh-cn/install-dependencies.md b/doc/zh-cn/install-dependencies.md
index 57fc1fd..8e986c9 100644
--- a/doc/zh-cn/install-dependencies.md
+++ b/doc/zh-cn/install-dependencies.md
@@ -55,7 +55,7 @@ sudo yum-config-manager --add-repo https://openresty.org/package/centos/openrest
 sudo yum install -y openresty curl git gcc openresty-openssl-devel unzip
 
 # 安装 LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # 开启 etcd server
 nohup etcd &
@@ -78,7 +78,7 @@ tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
 sudo yum install -y openresty curl git gcc openresty-openssl-devel
 
 # 安装 LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # 开启 etcd server
 nohup etcd &
@@ -104,7 +104,7 @@ tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
 sudo apt-get install -y git openresty curl openresty-openssl-dev
 
 # 安装 LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # 开启 etcd server
 nohup etcd &
@@ -135,7 +135,7 @@ tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
 sudo apt-get install -y git openresty curl make openresty-openssl-dev
 
 # 安装 LuaRocks
-curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | sudo bash -
+curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
 
 # 开启 etcd server
 nohup etcd &
diff --git a/utils/linux-install-luarocks.sh b/utils/linux-install-luarocks.sh
index e1070df..2694035 100755
--- a/utils/linux-install-luarocks.sh
+++ b/utils/linux-install-luarocks.sh
@@ -16,7 +16,6 @@
 # limitations under the License.
 #
 
-# you might need sudo to run this script
 if [ -z ${OPENRESTY_PREFIX} ]; then
     OPENRESTY_PREFIX="/usr/local/openresty"
 fi
@@ -38,7 +37,7 @@ fi
     > build.log 2>&1 || (cat build.log && exit 1)
 
 make build > build.log 2>&1 || (cat build.log && exit 1)
-make install > build.log 2>&1 || (cat build.log && exit 1)
+sudo make install > build.log 2>&1 || (cat build.log && exit 1)
 cd .. || exit
 rm -rf luarocks-3.4.0