完美解决XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root‘

2023-05-16

警告:对Linux不熟悉的人慎重使用,为了保险起见,你最好选择docker下的容器linux系统开发,如果在容器内也出现如下的问题,解决方法如下:

警告或报错问题:XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root‘
解决方法:
方法一:设置环境变量:终端输入export XDG_RUNTIME_DIR=/usr/lib/
方法二:在/etc/profile末尾增加两句

export XDG_RUNTIME_DIR=/usr/lib/
export RUNLEVEL=3

然后刷新全局变量

source /etc/profile

方法三:如果你的程序没有中断或严重BUG,那么该警告记录:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root’好像并不影响页面显示和程序的正常运行。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

完美解决XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root‘ 的相关文章

随机推荐