我正在尝试从 Windows 上运行的 Bash 脚本通过 mDNS 连接到 PC。虽然我能够.local在 CMD 中通过 PC 的 mDNS 地址 ping 通 PC,但由于主机名解析问题,在 Ubuntu/Bash 窗口中执行相同操作会失败。
当我尝试安装时avahi-daemon,似乎无法启动服务,因此我无法解析 mDNS 名称。
$ sudo apt-get install avahi-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libavahi-common-data libavahi-common3 libavahi-core7 libdaemon0 libnss-mdns
Suggested packages:
avahi-autoipd
The following NEW packages …Run Code Online (Sandbox Code Playgroud)