Ubuntu 18.04 ,其实用得是 Linux Mint 19.3
apt install mpd 自带的 mpd 版本较低,故编译安装。
按照 https://www.musicpd.org/doc/html/user.html 中 Compiling from source¶安装
详细安装日志烦请移步: https://pastebin.com/mG60p8q8
这里有一点比较有意思,就是最后一步ninja -C output/release install
,前面不加 sudo 过不去。
安装完后 mpd 报错找不到配置文件,
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [13:47:14]
$ sudo mpd
exception: No configuration file found
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [13:47:19] C:1
$ mpd
exception: No configuration file found
需要 touch 创建 /etc/mpd.conf,然后指定配置文件运行,是不是前面步骤没做好?(问题一)
明明没有运行 mpd,但是还提示 Address already in use,这是啥原因?(问题二)
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [14:13:23]
$ netstat -antlp | grep mpd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [14:13:28] C:1
$ netstat -antlp | grep 6600
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [14:13:52] C:1
$ mpd /etc/mpd.conf
exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use
output: No 'audio_output' defined in config file
output: Successfully detected a sndio audio device
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [14:13:58]
$ netstat -antlp | grep 6600
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::6600 :::* LISTEN 32660/mpd
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [14:14:19]
$ ps -ef | grep mpd
mint64 32660 3068 0 14:13 ? 00:00:00 mpd /etc/mpd.conf
mint64 32703 3668 0 14:14 pts/0 00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox mpd
服务都没装上的吗,看之前提示是装到 /usr/local/lib/systemd/system 了,这个怎么运行呐。(问题三)
# mint64 @ mint64-VirtualBox in ~/mpd-0.22.6 [14:18:13] C:4
$ systemctl status mpd.service
Unit mpd.service could not be found.
为了用 Linux,我最近感觉又有了年轻时的激情,但是总是遇到问题,啥时候才能配置好 i3wm 。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.