Hello!
2015-11-28 9:57 GMT+08:00 cover_eye:
> 您好,使用win32版openresty出错,请帮看下,多谢!
> 我下载了官网的openresty win32版本,操作系统:windows7专业版 6.1.7601 Service Pack1 32bit
> ,perl版本:ActivePerl-5.20.2.2002
>
> win32版本运行resty -e "ngx.say('Hello, OpenResty!')"出错,提示无法创建文件,如下:
> nginx: [emerg] CreateFile()
> "C:\Users\ADMINI~1\AppData\Local\Temp\_hUwON9tbx/conf/nginx.conf" failed (2:
> The system cannot find the file specified)
>
我没有 Windows 7,但我刚在一个干净的 Windows 10 上面安装了相同版本的 ActivePerl 和
ngx_openresty 1.9.3.2,并不能复现这个错误:
C:\Users\agentzh>perl -v
This is perl 5, version 20, subversion 2 (v5.20.2) built for
MSWin32-x86-multi-thread-64int
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2015, Larry Wall
Binary build 2002 [299195] provided by ActiveState
http://www.ActiveState.com
Built Jul 20 2015 13:29:53
Perl may be copied only under the terms of either the Artistic
License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
C:\Users\agentzh>cd ngx_openresty-1.9.3.2-win32
C:\Users\agentzh\ngx_openresty-1.9.3.2-win32>resty -e
"ngx.say('hello, world')"
hello, world
或许你运行 resty 的方式有权限方面的问题?你是像我上面这样直接在 cmd.exe 终端里面使用当前用户直接运行的吗?
Regards,
-agentzh