Tuesday, November 1, 2011

mpd 启动错误 Address family not supported by protocol

这2天arch启动的时候tty1老提示 Error : Socked :  Address family not supported by protocol


放google搜索,找到Address family not supported by protocol - IPv6 issue on machines with disabled v6

This happens on a machine that has socket.has_ipv6 set to true as the linux system supports IPv6, but jason has disabled IPv6 by following https://wiki.archlinux.org/index.php/IPv6_-_Disabling_the_Module

手动启动的时候提示如下错误:

listen: bind to '[::1]:6600' failed: Failed to create socket: Address family not supported by protocol (continuing anyway, because binding to '127.0.0.1:6600' succeeded)
playlist directory is not a directory: "/home/jarodlau/.mpd/playlists"

原来是禁用ipv6的结果,另外我没有把播放列表的目录拼写正确,少了个s,应该是playlists,我的写成了playlist

解决办法很简单 :

编辑 /etc/hosts文件 ,把一些ipv6的地址注释掉就ok了,如下

/etc/hosts.html
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1   localhost.localdomain   localhost arch-laptop
#::1        localhost.localdomain   localhost

# End of file

No comments: