sh: ip: 命令未找到 centos

Jes*_*zie 4 php bash centos

我正在调试一些代码,我有以下行,我认为这会导致我的 php 日志中出现错误sh: ip: command not found关于为什么或Centos服务器上缺少哪些包的任何想法?

代码:

exec("ip tunnel show | cut -f1 -d' ' | cut -f1 -d':'", $someVar);

Cyr*_*rus 6

添加路径:替换ip/sbin/ip.