dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
答案1
以 root 身份添加/sbin
到您的 $PATH
检查/etc/sudoers
文件是否具有正确的 PATH。默认/etc/sudoers
情况下应具有下面提到的路径。如果不存在,请继续添加 /sbin。
示例/etc/sudoers
文件:
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"