出现的原因是没有配置Linux系统的环境变量导致
vim /etc/profile - 编辑环境变量 在最后一行添加你的PHP的bin安装目录 export PATH=$PATH:PHP安装目录/php/bin 重新加载profile文件,立即生效 source /etc/profile - 环境变量生效