在openresty安装中找不到CC命令。

我对 Linux 并不是很熟悉,刚开始学习 nginx 和 nodejs。由于我使用的是 Windows,我尝试通过 MinGW 安装 openresty,运行以下命令:

tar xvf ngx_openresty-1.9.7.1.tar.gz
cd ngx_openresty-1.9.7.1/
./configure

但是我遇到了以下错误:

platform: msys (msys)
cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20151219
Can't exec "cc": No such file or directory at ./configure line 588.
make TARGET_STRIP=@: CCDEBUG=-g CC=cc PREFIX=/usr/local/openresty/luajit
==== Building LuaJIT 2.1.0-beta1 ====
make -C src
make[1]: cc: Command not found
make[1]: Entering directory `/c/ngx_openresty-1.9.7.1/build/LuaJIT-2.1-20151219/src'
make[1]: cc: Command not found
make[1]: cc: Command not found
make[1]: cc: Command not found
make[1]: cc: Command not found
make[1]: cc: Command not found
Makefile:262: *** Unsupported target architecture.  Stop.
make[1]: Leaving directory `/c/ngx_openresty-1.9.7.1/build/LuaJIT-2.1-20151219/src'
make: *** [default] Error 2
ERROR: failed to run command: make TARGET_STRIP=@: CCDEBUG=-g CC=cc PREFIX=/usr/local/openresty/luajit

我需要安装其他东西吗? GCC 存在,版本为 3.4.4(msys 专属)

点赞
用户6834326
用户6834326

请确保你已经在 Linux 中安装了 c & c++ 编译器。

你可以尝试通过以下命令来安装编译器:

yum install gcc

该编译器包括 C、C++、Objective-C、Fortran、Java、Ada 及 Go。

2017-09-05 05:34:47