我想在My Ubuntu 14.04 LTS中安装Mosquitto
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto-clients
但我测试安装时遇到错误:
devuser@localhost:~$ mosquitto_sub -t '$SYS/#' -v
Error: Connection refused
从外面ping主机很好:
ping 199.162.221.117
PING 199.162.221.117 (199.162.221.117): 56 data bytes
64 bytes from 199.162.221.117: icmp_seq=0 ttl=55 time=102.234 ms
但不是
ping 199.162.221.117:1883
ping: cannot resolve 199.162.221.117:1883: Unknown host
也
devuser@localhost:~$ sudo start mosquitto
[sudo] password for devuser:
start: Unknown job: mosquitto
也
devuser@localhost:~$ sudo /etc/init.d/mosquitto start
sudo: /etc/init.d/mosquitto: command not found
答案 0 :(得分:0)
您只安装了mosquitto命令行客户端(mosquitto_sub& mosquitto_pub)而非实际经纪人
$ sudo apt-get install mosquitto
那应该安装实际的代理,然后你可以用你列出的最后一个命令开始