sublimetext3 - 使用 Sublime 编辑 Yocto 文件,导致启动 bitbake 服务器失败
问题描述
如果我在 Ubuntu 16.04 下使用Sublime打开我的 Yocto 项目文件夹并尝试使用以下命令构建:
bitbake <image>
我收到这些错误:
ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxeglfs-stm32mp1-sw25v00/bitbake-cookerdaemon.log):
--- Starting bitbake server pid 4602 at 2020-02-01 02:59:00.519051 ---
Traceback (most recent call last):
File "/local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/bitbake/lib/bb/daemonize.py", line 83, in createDaemon
function()
File "/local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/bitbake/lib/bb/server/process.py", line 469, in _startServer
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
File "/local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/bitbake/lib/bb/cooker.py", line 210, in __init__
self.initConfigurationData()
File "/local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/bitbake/lib/bb/cooker.py", line 396, in initConfigurationData
self.add_filewatch(mc.getVar("__base_depends", False), self.configwatcher)
File "/local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/bitbake/lib/bb/cooker.py", line 306, in add_filewatch
watcher.add_watch(f, self.watchmask, quiet=False)
File "/local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/bitbake/lib/pyinotify.py", line 1924, in add_watch
raise WatchManagerError(err, ret_)
pyinotify.WatchManagerError: add_watch: cannot watch /local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxeglfs-stm32mp1-sw25v00/conf WD=-1, Errno=No space left on device (ENOSPC)
ERROR: No space left on device or exceeds fs.inotify.max_user_watches?
ERROR: To check max_user_watches: sysctl -n fs.inotify.max_user_watches.
ERROR: To modify max_user_watches: sysctl -n -w fs.inotify.max_user_watches=<value>.
ERROR: Root privilege is required to modify max_user_watches.
关闭编辑器并再次发出命令正常工作。其他编辑器(如gedit
)没有这种行为。
我知道我可以没有Sublime
,但我想了解错误的原因。
解决方案
你的inotify
手表快用完了。诸如 Sublime 之类的软件和您在此处运行的程序(以及其他)使用inotify
监视来检测文件系统的更改,例如能够跟踪文件何时更改或目录内容何时更改。
一次可以使用的手表数量有一个(用户可设置的)上限,您在这里看到的相当神秘的错误消息是达到限制并且程序无法获得手表的症状。
对于您正在使用的软件(和文件量),您的系统上的最大观看次数的默认值inotify
可能设置得不够高,但您可以根据需要进行更改。
错误诊断信息底部的输出显示了如何查看/调整上限。以下问题还显示了您也可以如何做到这一点。
https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-reached
推荐阅读
- javascript - Angularjs 在函数后执行(承诺?)
- c# - 下一步是什么,我有代码,但我不知道下一步该怎么做?
- bash - bash:如何计算不同列的平均值?
- swift - 按下两次标签栏滚动到 UIViewController 的顶部
- google-cloud-firestore - Firebase 安全规则来限制除一条以外的所有路径的访问?
- python - 如何通过嵌套的for循环?
- templates - 构造函数中无法解析的两阶段模板化别名?
- android - onsavedinstancestate 似乎不支持双数组列表我有什么选择?
- python - 使用 Python Flask 和 jQuery 删除 Sqlite 数据库中的行
- python-3.x - 从集合列表中查找元素数量最少的集合