mac command not found

Mac command not found

问题描述

今天在mac上通过brew install mosquitto安装了一个mosquitto服务,使用brew services start mosquitto、brew services stop mosquitto开启关闭服务。
但是当通过 mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf启动服务时会报command not found错误

解决方案

根据上述问题总结出 应该是环境变量配置出现了问题,解决方法:

sudo vi ~/.bash_profile
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

结果

问题解决

猜你喜欢

转载自www.cnblogs.com/gaofengfengfeng/p/9068321.html