Estoy tratando de conectarme a una PC a través de mDNS desde un script Bash que se ejecuta en Windows. Si bien puedo hacer ping a la PC a través de su .local
dirección mDNS en CMD, hacer lo mismo en una ventana de Ubuntu / Bash falla debido a un problema de resolución de nombre de host.
Cuando intento instalar avahi-daemon
, parece que no puedo iniciar el servicio, y como resultado no puedo resolver los nombres 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 will be installed:
avahi-daemon libavahi-common-data libavahi-common3 libavahi-core7 libdaemon0
libnss-mdns
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 220 kB of archives.
After this operation, 1,094 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libavahi-common-data amd64 0.6.31-4ubuntu1 [21.2 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main libavahi-common3 amd64 0.6.31-4ubuntu1 [21.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main libavahi-core7 amd64 0.6.31-4ubuntu1 [80.9 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main libdaemon0 amd64 0.14-2ubuntu1 [16.4 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main avahi-daemon amd64 0.6.31-4ubuntu1 [58.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty/main libnss-mdns amd64 0.10-6 [21.4 kB]
Fetched 220 kB in 1s (159 kB/s)
Selecting previously unselected package libavahi-common-data:amd64.
(Reading database ... 24998 files and directories currently installed.)
Preparing to unpack .../libavahi-common-data_0.6.31-4ubuntu1_amd64.deb ...
Unpacking libavahi-common-data:amd64 (0.6.31-4ubuntu1) ...
Selecting previously unselected package libavahi-common3:amd64.
Preparing to unpack .../libavahi-common3_0.6.31-4ubuntu1_amd64.deb ...
Unpacking libavahi-common3:amd64 (0.6.31-4ubuntu1) ...
Selecting previously unselected package libavahi-core7:amd64.
Preparing to unpack .../libavahi-core7_0.6.31-4ubuntu1_amd64.deb ...
Unpacking libavahi-core7:amd64 (0.6.31-4ubuntu1) ...
Selecting previously unselected package libdaemon0.
Preparing to unpack .../libdaemon0_0.14-2ubuntu1_amd64.deb ...
Unpacking libdaemon0 (0.14-2ubuntu1) ...
Selecting previously unselected package avahi-daemon.
Preparing to unpack .../avahi-daemon_0.6.31-4ubuntu1_amd64.deb ...
Unpacking avahi-daemon (0.6.31-4ubuntu1) ...
Selecting previously unselected package libnss-mdns:amd64.
Preparing to unpack .../libnss-mdns_0.10-6_amd64.deb ...
Unpacking libnss-mdns:amd64 (0.10-6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libavahi-common-data:amd64 (0.6.31-4ubuntu1) ...
Setting up libavahi-common3:amd64 (0.6.31-4ubuntu1) ...
Setting up libavahi-core7:amd64 (0.6.31-4ubuntu1) ...
Setting up libdaemon0 (0.14-2ubuntu1) ...
Setting up avahi-daemon (0.6.31-4ubuntu1) ...
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of force-reload.
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libnss-mdns:amd64 (0.10-6) ...
First installation detected...
Checking NSS setup...
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
$ ping my-other-pc.local
ping: unknown host my-other-pc.local
¿Qué necesito hacer para poder resolver los nombres mDNS? ¿Existe una alternativa a la instalación de Avahi que funcione, o hay algo más que deba hacer para que este paquete funcione?