以cmake为例 首先使用find / -name cmake 一般找以bin目录的,然后将/usr/local/bin拷贝,打开/etc/sudoers 在后面加上/usr/local/bin,保存退出即可。