Do you want to install the software package? [y/N]:y
dpkg: warning: 'dpkg-deb' 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
echo $PATH
/usr/lib/jvm/java-8-oracle/jre/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/lib/jvm/oracle_jdk8/bin:/usr/lib/jvm/oracle_jdk8/
答案1
由于您仍然可以运行 dpkg,至少部分 dpkg 软件包仍然存在。要恢复 dpkg-deb,您应该尝试重新安装 dpkg:
下载适当的软件包文件(Mint 18.3 基于 Ubuntu 16.04,因此请在此页面上查找 Xenial 以获取适当的链接;我在此处提供的下载链接假设您使用的是 amd64)
wget https://launchpad.net/ubuntu/+archive/primary/+files/dpkg_1.18.4ubuntu1.6_amd64.deb
install it
sudo dpkg -i dpkg_1.18.4ubuntu1.6_amd64.deb
如果失败了,您将需要采取 arved 的回答中所建议的更手动的方法:
ar x dpkg_1.18.4ubuntu1.6_amd64.deb data.tar.gz
tar xf data.tar.gz ./usr/bin/dpkg-deb
sudo install usr/bin/dpkg-deb /usr/bin
然后使用 dpkg 安装该包以确保一切设置正确。