1
Traceback (most recent call last):
  File "scripts/rule_bison.py", line 75, in <module>
    return Code = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp])
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

我正在尝试使用 ninja 构建铬源代码。然后我得到了上面的错误。我不知道怎么弄明白。你能给我一些想法吗?

4

1 回答 1

3

这意味着bisonExe找不到由变量命名的任何二进制文件。任何不存在的Errno 2二进制文件都会抛出错误:

>>> subprocess.call(['spamandeggs', '-V'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
于 2012-12-24T16:00:36.583 回答