3

我需要为一个项目运行节点 0.8.4,但我无法安装它。我已经安装了nvm以便与我当前系统版本的节点一起运行它,但是当我运行时出现错误nvm install 0.8.4

Node.js configure error: No acceptable C compiler found!

        Please make sure you have a C compiler installed on your system and/or
        consider adjusting the CC environment variable if you installed
        it in a non-standard prefix.

./configure
Node.js configure error: No acceptable C compiler found!

        Please make sure you have a C compiler installed on your system and/or
        consider adjusting the CC environment variable if you installed
        it in a non-standard prefix.

python tools/gyp_node -f make
Traceback (most recent call last):
  File "tools/gyp_node", line 58, in <module>
    run_gyp(gyp_args)
  File "tools/gyp_node", line 18, in run_gyp
    rc = gyp.main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 471, in main
    options.circular_check)
  File "./tools/gyp/pylib/gyp/__init__.py", line 111, in Load
    depth, generator_input_info, check, circular_check)
  File "./tools/gyp/pylib/gyp/input.py", line 2378, in Load
    depth, check)
  File "./tools/gyp/pylib/gyp/input.py", line 430, in LoadTargetBuildFile
    includes, depth, check)
  File "./tools/gyp/pylib/gyp/input.py", line 384, in LoadTargetBuildFile
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "./tools/gyp/pylib/gyp/input.py", line 975, in ProcessVariablesAndConditionsInDict
    variables, build_file, 'variables')
  File "./tools/gyp/pylib/gyp/input.py", line 982, in ProcessVariablesAndConditionsInDict
    expanded = ExpandVariables(value, phase, variables, build_file)
  File "./tools/gyp/pylib/gyp/input.py", line 739, in ExpandVariables
    ' in ' + build_file
KeyError: 'Undefined variable target_arch in /Users/raddevon/.nvm/src/node-v0.8.4/deps/v8/tools/gyp/v8.gyp while loading dependencies of /Users/raddevon/.nvm/src/node-v0.8.4/node.gyp while trying to load /Users/raddevon/.nvm/src/node-v0.8.4/node.gyp'
make: *** [out/Makefile] Error 1
nvm: install v0.8.4 failed!

我首先尝试确保我安装了 Xcode 命令行工具,看来我确实安装了。gcc确实有效。有什么想法可以让这个工作吗?

4

0 回答 0