1.查看某个端口被占用,如lsof -i:8080
出现如下结果
java 20092 menchao 169u IPv6 0xc58b419f2014a935 0t0 TCP *:http-alt (LISTEN)
杀掉这个端口
kill -9 20092
2. sudo 命令无效的解决办法
sudo: /etc/sudoers is owned by uid 501, should be 0
root用户下输入
chown root:wheel /etc/sudoers
1.查看某个端口被占用,如lsof -i:8080
出现如下结果
java 20092 menchao 169u IPv6 0xc58b419f2014a935 0t0 TCP *:http-alt (LISTEN)
杀掉这个端口
kill -9 20092
2. sudo 命令无效的解决办法
sudo: /etc/sudoers is owned by uid 501, should be 0
root用户下输入
chown root:wheel /etc/sudoers