让节点在cygwin中工作

 sa沙沙ssa 发布于 2023-01-11 18:45

我试图让节点在cygwin中工作,我正在努力...

安装cygwin的路径 C:\cygwin64

存储节点的路径(Windows安装版)C:\Program Files\nodejs

CYGWIN

$ node --version
v0.10.28
$ npm --version
/cygdrive/c/Program Files/nodejs/npm: line 2: $'\r': command not found
/cygdrive/c/Program Files/nodejs/npm: line 4: $'\r': command not found
/cygdrive/c/Program Files/nodejs/npm: line 5: syntax error near unexpected token `$'in\r''
'cygdrive/c/Program Files/nodejs/npm: line 5: `case `uname` in

Windows CMD

>node --version
v0.10.28
>npm --version
1.4.9

然后我卸载节点,我尝试使用Windows方法,建立它在Cygwin的这里.但我有麻烦./configuremake下面的部分.我究竟做错了什么?

./配置:

$ ./configure
ctrpp not found in WinSDK path--using pre-gen files from tools/msvs/genfiles.
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': ['OPENSSL_NO_SSL2=1'],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'clang': 0,
                 'gcc_version': 48,
                 'host_arch': 'x64',
                 'node_install_npm': 'true',
                 'node_prefix': '',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'true',
                 'node_use_mdb': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'true',
                 'python': '/usr/bin/python',
                 'target_arch': 'x64',
                 'uv_library': 'static_library',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_random_seed': 0,
                 'v8_use_snapshot': 'true'}}
creating  ./config.gypi
creating  ./config.mk
cygwin warning:
  MS-DOS style path detected: C:\Users\User Name/.gyp
  Preferred POSIX equivalent is: /cygdrive/c/Users/User Name/.gyp
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

使:

$ make
/usr/bin/python tools/gyp_node.py -f make
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/home/User Name/node/out'
Makefile:271: *** mixed implicit and normal rules.  Stop.
make[1]: Leaving directory '/home/User Name/node/out'
Makefile:45: recipe for target 'node' failed
make: *** [node] Error 2

注意:我在这里和这里发现了类似的问题,但没有解决不是因为缺乏尝试:(

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有