我刚刚在楼下的 Ubuntu 服务器上安装了 Gerbera,并尝试使用 启动它gerbera
。它首先生成了一个配置文件,然后出现此错误:
sarah@scilab_comp_0:~$ gerbera
2019-05-19 05:42:33 INFO: Gerbera UPnP Server version 1.1.0 - http://gerbera.io/
2019-05-19 05:42:33 INFO: ===============================================================================
2019-05-19 05:42:33 INFO: Gerbera is free software, covered by the GNU General Public License version 2
2019-05-19 05:42:33 INFO: Copyright 2016-2017 Gerbera Contributors.
2019-05-19 05:42:33 INFO: Gerbera is based on MediaTomb: Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
2019-05-19 05:42:33 INFO: ===============================================================================
2019-05-19 05:42:33 INFO: Loading configuration from: /home/sarah/.config/gerbera/config.xml
2019-05-19 05:42:33 INFO: Checking configuration...
2019-05-19 05:42:33 INFO: Setting filesystem import charset to UTF-8
2019-05-19 05:42:33 INFO: Setting metadata import charset to UTF-8
2019-05-19 05:42:33 INFO: Setting playlist charset to UTF-8
2019-05-19 05:42:33 WARNING: You enabled the YouTube feature, which allows you
to watch YouTube videos on your UPnP device!
Please check http://www.youtube.com/t/terms
By using this feature you may be violating YouTube
service terms and conditions!
2019-05-19 05:42:33 INFO: Configuration check succeeded.
Exception raised in [src/server.cc:123] upnp_init(): upnp_init: UpnpInit failed
2019-05-19 05:42:33 ERROR: main: upnp error -203
2019-05-19 05:42:33 ERROR: Could not bind to socket.
2019-05-19 05:42:33 INFO: Please check if another instance of Gerbera or
2019-05-19 05:42:33 INFO: another application is running on port 0.
2019-05-19 05:42:33 ERROR: upnp_cleanup: UpnpUnRegisterRootDevice failed
Exception raised in [src/server.cc:248] shutdown(): upnp_cleanup: UpnpUnRegisterRootDevice failed
不知道为什么。
奇怪的是,非洲菊服务已启动并正在运行:
● gerbera.service - Gerbera Media Server
Loaded: loaded (/lib/systemd/system/gerbera.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2019-05-19 05:40:08 UTC; 6min ago
Docs: man:gerbera(1)
https://gerbera.io/
Main PID: 28343 (gerbera)
Tasks: 12 (limit: 4467)
CGroup: /system.slice/gerbera.service
└─28343 /usr/bin/gerbera -c /etc/gerbera/config.xml
May 19 05:40:08 scilab_comp_0 gerbera[28343]: 2019-05-19 05:40:08 INFO: Setting playlist charset to UTF-8
May 19 05:40:08 scilab_comp_0 gerbera[28343]: 2019-05-19 05:40:08 WARNING: You enabled the YouTube feature, which allows you
May 19 05:40:08 scilab_comp_0 gerbera[28343]: to watch YouTube videos on your UPnP device!
May 19 05:40:08 scilab_comp_0 gerbera[28343]: Please check http://www.youtube.com/t/terms
May 19 05:40:08 scilab_comp_0 gerbera[28343]: By using this feature you may be violating YouTube
May 19 05:40:08 scilab_comp_0 gerbera[28343]: service terms and conditions!
May 19 05:40:08 scilab_comp_0 gerbera[28343]: 2019-05-19 05:40:08 INFO: Configuration check succeeded.
May 19 05:40:08 scilab_comp_0 gerbera[28343]: 2019-05-19 05:40:08 INFO: Initialized port: 49152
May 19 05:40:08 scilab_comp_0 gerbera[28343]: 2019-05-19 05:40:08 INFO: Server bound to: 192.168.1.222
May 19 05:40:08 scilab_comp_0 gerbera[28343]: 2019-05-19 05:40:08 INFO: The Web UI can be reached by following this link: http://192.168.1.222:49152/
我使用 gerbera 的方式是否不正确?如何让它工作并查看文件夹中的媒体?
答案1
在 ubuntu 上安装后,gerbera 会自动作为守护进程启动(通过用户gerbera
)。要手动启动它,您必须终止守护进程,例如
ps aux | grep gerbera
sudo kill <pid>