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 构建 chromium 源代码。然后我得到了上面的错误。我不知道如何弄清楚。你能给我一些想法吗?
最佳答案
这意味着未找到由变量 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
关于python - 构建chrome时出错,subprocess.call抛出 "No such file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14023273/