clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable

{app.params.name}} {app.params.name}} {app.params.name}}

xcode下创建一个项目,但是运行的时候出现了如下的错误:


clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
clang: error: clang frontend command failed due to signal (use -v to see invocation)
经过查找资料,有个说明是这样的,如下:


you may be running into too-low limits on the number of concurrent processes allowed on the machine. Check:


sysctl kern.maxproc
sysctl kern.maxprocperuid
You can increase them with e.g.:



sudo sysctl -w kern.maxproc=2500
sudo sysctl -w kern.maxprocperuid=2500
But normally this shouldn't be necessary if you're building on 10.7 or higher. If you see this, check if some rogue program spawned hundreds of processes and kill them first.


我按照上面的流程执行了操作:


davidzhang@davidzhang:~/command$ sysctl kern.maxproc
kern.maxproc: 1064
davidzhang@davidzhang:~/command$ sysctl kern.maxprocperuid
kern.maxprocperuid: 709
davidzhang@davidzhang:~/command$ sudo sysctl -w kern.maxproc=2500
Password:
kern.maxproc: 1064 -> 2500
davidzhang@davidzhang:~/command$ sudo sysctl -w kern.maxprocperuid=2500
kern.maxprocperuid: 709 -> 2500

最后运行我的项目的时候,问题就解决了

查询参考资料:http://code.google.com/p/chromium/wiki/MacBuildInstructions



版权声明

davidzhang 创作并维护的 Gowhich 博客采用 创作共用保留署名-非商业-禁止演绎4.0国际许可证。

本文首发于 Gowhich 博客( https://www.gowhich.com ),版权所有,侵权必究。

本文永久链接: https://www.gowhich.com/blog/108

comments powered by Disqus