今天在mac上經過brew install mosquitto安裝了一個mosquitto服務,使用brew services start mosquitto、brew services stop mosquitto開啓關閉服務。
可是當經過 mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf啓動服務時會報command not found錯誤bash
根據上述問題總結出 應該是環境變量配置出現了問題,解決方法:ui
sudo vi ~/.bash_profile export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
問題解決3d