首页 > 解决方案 > Gstreamer,XDG_RUNTIME_DIR 未设置错误

问题描述

当我遇到以下错误时,我正在阅读本教程。

操作系统描述:LINUX UBUNTU 20.04 LTS

输入:在教程文件中使用成功编译教程后

gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs gstreamer-1.0`

并执行教程

 ./basic-tutorial-1 

如网站所述,我得到了这个输出。

error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
shared memfd open() failed: Function not implemented
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory

我已经阅读过,XDG_RUNTIME_DIR但我不确定我应该将它分配给哪个文件,或者这是否是问题所在;参考

标签: pythonlinuxgstreamer

解决方案


推荐阅读