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 2021/07/29 10:05:03 UTC

[GitHub] [apisix] imjoey opened a new issue #4703: bug(installation): failed to install luarocks on CentOS 7 due to permission problems

imjoey opened a new issue #4703:
URL: https://github.com/apache/apisix/issues/4703


   ### Issue description
   
   I was going to install APISIX on CentOS 7 and followed the installation guide at https://github.com/apache/apisix/blob/master/docs/en/latest/install-dependencies.md#centos-7. While I got an error as running the script `curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -`:
   
   ```
   ......
   + make build
   + msg='rerun this script with '\''sudo'\'' if you failed to make install because of privilege problem.'
   + make install
   + cat build.log
   mkdir -p "/usr/local/bin"
   install "build/luarocks" "/usr/local/bin/luarocks"
   install: cannot create regular file '/usr/local/bin/luarocks': Permission denied
   make: *** [GNUmakefile:117: /usr/local/bin/luarocks] Error 1
   + echo 'rerun this script with '\''sudo'\'' if you failed to make install because of privilege problem.'
   rerun this script with 'sudo' if you failed to make install because of privilege problem.
   + exit 1
   ```
   
   Although the error message is very clear, while this error would still break the installation progress, not so good experience for users. This issue probably affects other OS distributions.
   
   So how about we add the `sudo` back to the script `make install > build.log 2>&1 || (cat build.log && echo "$msg" && exit 1)` at https://github.com/apache/apisix/blob/master/utils/linux-install-luarocks.sh#L43? This might make the overall installation more smooth. 
   
   FYI, the `sudo` was removed at PR https://github.com/apache/apisix/pull/4167. Please correct me if I missed anything. Thanks.
   
   ### Environment
   
   Bug report without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`): `master`
   * OS (cmd: `uname -a`): 
   ```
   Linux localhost 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   ```
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 
   ```
   nginx version: openresty/1.19.3.2
   built by gcc 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)
   built with OpenSSL 1.1.1k  25 Mar 2021
   TLS SNI support enabled
   configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' --add-module=../ngx_devel_kit-0.3.1 --add-module=../echo-nginx-module-0.62 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.32 --add-module=../ngx_lua-0.10.19 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../ngx_stream_lua-0.0.9 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/loca
 l/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' --with-cc='ccache gcc -fdiagnostics-color=always' --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-compat --with-stream --with-http_ssl_module
   ```
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): `no`
   * apisix-dashboard version, if have: `no`
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`): 
   ```
   /usr/local/bin/luarocks 3.4.0
   LuaRocks main command-line interface
   ```
   
   ### Minimal test code / Steps to reproduce the issue
   
   Bug report without steps to reproduce will be ignored or closed.
   
   1. Install the dependencies of APISIX as described in https://github.com/apache/apisix/blob/master/docs/en/latest/install-dependencies.md;
   2. Failed to install luarocks due to the permission problems of the script `utils/linux-install-luarocks.sh `;
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   Failed to install the luarocks.
   
   ### What's the expected result?
   
   Successfully install luarocks.
   
   


-- 
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



[GitHub] [apisix] spacewander commented on issue #4703: bug(installation): failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-888993805


   The `sudo` will pollute the binary even we don't need it.


-- 
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



[GitHub] [apisix] imjoey commented on issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-889035907


   > The `sudo` will pollute the binary even we don't need it.
   
   @spacewander thanks for the reply. Sorry that I still got confused. IMHO, the parameters for `./configure` luarocks defined in script `linux-install-luarocks.sh` would always install luarocks at `/usr/local`, which is also always requiring the `sudo` privileges. So may I ask when we exactly don't need it? Much appreciated. 😄 
   
   


-- 
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



[GitHub] [apisix] imjoey closed issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
imjoey closed issue #4703:
URL: https://github.com/apache/apisix/issues/4703


   


-- 
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



[GitHub] [apisix] imjoey commented on issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-889575642


   PR #4708 has been merged and everything seems fine until now. So I would prefer to close this issue. Please feel free to reopen this if there's anything unexpected. @spacewander thanks for your help.


-- 
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



[GitHub] [apisix] imjoey commented on issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-889077368


   @spacewander 
   
   > Anyway, we can submit a PR to change it back with `sudo make install` and see what will happen.
   
   Thanks for your suggestions. In my environment `sudo make install` will install `luarocks` as intended. 
   
   > > BTW, I'm afraid that this issue is obviously a bug, instead of a request help.
   > 
   > I can't agree with this part. The behavior must be intended as there was a PR to change this behavior. However, I can't recall the context of why the PR was submitted.
   Thanks for your opinion. To be more clear, I would say there is a bug in the overall installation solution provided by the docs and scripts, not only considering the **no sudo** is a bug. 😄 
   
   Let us see what will happen. 😄 
   


-- 
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



[GitHub] [apisix] spacewander commented on issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-889061011


   > BTW, I'm afraid that this issue is obviously a bug, instead of a request help.
   
   I can't agree with this part. The behavior must be intended as there was a PR to change this behavior. However, I can't recall the context of why the PR was submitted.


-- 
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



[GitHub] [apisix] imjoey edited a comment on issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
imjoey edited a comment on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-889077368


   @spacewander 
   
   > Anyway, we can submit a PR to change it back with `sudo make install` and see what will happen.
   
   Thanks for your suggestions. In my environment `sudo make install` will install `luarocks` as intended. 
   
   > > BTW, I'm afraid that this issue is obviously a bug, instead of a request help.
   > 
   > I can't agree with this part. The behavior must be intended as there was a PR to change this behavior. However, I can't recall the context of why the PR was submitted.
   
   Thanks for your opinion. To be more clear, I would say there is a bug in the overall installation solution provided by the docs and scripts, not only considering the **no sudo** is a bug. 😄 
   
   Let us see what will happen. 😄 
   


-- 
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



[GitHub] [apisix] spacewander commented on issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-889061415


   Anyway, we can submit a PR to change it back with `sudo make install` and see what will happen.


-- 
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



[GitHub] [apisix] imjoey commented on issue #4703: request help: failed to install luarocks on CentOS 7 due to permission problems

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #4703:
URL: https://github.com/apache/apisix/issues/4703#issuecomment-889040239


   @spacewander BTW, I'm afraid that this issue is obviously a **bug**, instead of a **request help**. It would be great if we would better improve either the script or the docs, to lead users to install APISIX smoothly without any interruption. Of course, I can handle this. Looking forward to your suggestions. 😄 Thanks.


-- 
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