在我的Yocto图像(带有.deb包装)上,我设置了sudo,效果很好。仅当我尝试使用以下方法安装.deb软件包时:
sudo dpkg -i package-name.deb
结果为:
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
我已经在/ etc / sudoers中手动执行了变通方法:
## Uncomment to use a hard-coded PATH instead of the user's to find commands
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
然后 sudo dpkg 工作了
现在的问题是:
如何在yocto build中做到这一点?如何更改/ etc / sudoers文件,以在构建中将此设置作为默认设置?还是有其他解决方案?
非常感谢您提供帮助