尝试通过 ubuntu 运行 LOve2d,但它提示无法初始化 SDL 视频子系统

尝试通过 ubuntu 运行 LOve2d,但它提示无法初始化 SDL 视频子系统

这是我在 ubuntu 上运行 love2d 时遇到的错误。不知道该如何继续。

error: XDG_RUNTIME_DIR not set in the environment.
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Could not open device.
error: XDG_RUNTIME_DIR not set in the environment.
Error: Could not initialize SDL video subsystem (No available video device)
stack traceback:
        [love "boot.lua"]:345: in function <[love "boot.lua"]:341>
        [C]: at 0x7fb4d40246f0
        [C]: in function 'require'
        [love "boot.lua"]:251: in function <[love "boot.lua"]:126>
        [C]: in function 'xpcall'
        [love "boot.lua"]:355: in function <[love "boot.lua"]:348>
        [C]: in function 'xpcall'

相关内容