我从以下网址下载了 ngx_openresty-1.2.6.6.tar.gz(稳定版本)http://openresty.org/ 我在终端上执行了以下命令:
tar xzvf ngx_openresty-VERSION.tar.gz
cd ngx_openresty-VERSION/
./configure --with-luajit
make
make install
我无法在计算机上安装 openresty。我认为 make install 命令不起作用,因为当我使用 时它会提示我错误make install
。
(etc...+) ==== 将 LuaJIT 2.0.0 安装到 /usr/local/openresty/luajit ==== mkdir -p /usr/local/openresty/luajit/bin /usr/local/openresty/luajit/lib /usr/local/openresty/luajit/include/luajit-2.0 /usr/local/openresty/luajit/share/man/man1 /usr/local/openresty/luajit/lib/pkgconfig /usr/local/openresty/luajit/share/luajit-2.0.0/jit /usr/local/openresty/luajit/share/lua/5.1 /usr/local/openresty/luajit/lib/lua/5.1 cd src && install -m 0755 luajit /usr/local/openresty/luajit/bin/luajit-2.0.0安装:无法删除/usr/local/openresty/luajit/bin/luajit-2.0.0': Permission denied make[1]: *** [install] Error 1 make[1]: Leaving directory
/ngx_openresty-1.2.6.6/build/LuaJIT-2.0.0' make:*** [安装] 错误 2
请告诉我在 Ubuntu 上安装 openresty 的方法。
答案1
您需要有在 /usr/local 目录下安装的权限。
尝试使用 sudo 命令作为
sudo make install
注意:如果要求输入密码,请输入您的用户密码。如果这不起作用,则
您需要以 root 身份安装或
将安装目录更改为您可以访问的位置,例如 echo $HOME
./configure --with-luajit --prefix=$HOME make make install
安装完成后,按照“入门”链接http://openresty.org/