![无法在 Ubuntu 服务器上安装 Openssh-Server](https://linux22.com/image/1131659/%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E5%AE%89%E8%A3%85%20Openssh-Server.png)
我正在尝试安装 OpenSSH-Server 并收到以下错误,
Unpacking openssh-server (from .../openssh-server_1%3a5.9p1-5ubuntu1.7_amd64.deb) ...
/var/lib/dpkg/tmp.ci/preinst: 17: exec: /usr/share/debconf/frontend: Permission denied
dpkg: error processing /var/cache/apt/archives/openssh-server_1%3a5.9p1-5ubuntu1.7_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 126
Errors were encountered while processing:
/var/cache/apt/archives/openssh-server_1%3a5.9p1-5ubuntu1.7_amd64.deb
我正在apt-get install openssh-server
以 root 用户身份运行。
答案1
由于某种原因,程序执行的权限标志已被删除/usr/share/debconf/frontend
。您可以使用以下命令将其重新设置:
sudo chmod +x /usr/share/debconf/frontend
但是,这可能是某些更广泛的潜在问题的症状,即软件包损坏,最好重新安装该debconf
软件包(属于/usr/share/debconf/frontend
):
sudo apt install --reinstall /usr/share/debconf/frontend