问题描述
# 启动 nfs-server 时失败。
systemctl start nfs-server
# 查看信息,出现: Dependency failed for NFS server and services.
systemctl status nfs-server
# 查看依赖服务 rpcbind 的状态,发现 tcp6 udp6 报错
systemctl status rpcbind
解决
# 修改网络配置
sudo vim /etc/netconfig
# 注释掉 udp6 tcp6 那两行
# 重启 rpcbind
sudo systemctl restart rpcbind
# 再次查看 rpcbind 状态没有报错信息
sudo systemctl status rpcbind
# 尝试重启 nfs-server
sudo systemctl restart nfs-server
# 如果问题依然在,重启系统后再尝试启动(我的系统重启后就没问题了)
sudo reboot
sudo systemctl start nfs-server