![如何在 Ubuntu 中重新安装 bash?](https://linux22.com/image/596507/%E5%A6%82%E4%BD%95%E5%9C%A8%20Ubuntu%20%E4%B8%AD%E9%87%8D%E6%96%B0%E5%AE%89%E8%A3%85%20bash%EF%BC%9F.png)
bash 似乎出现了段错误,我的系统已经崩溃。我原本想尝试重新安装 bash,而不是重新安装整个操作系统,但这显然并不简单。我无法使用 apt-get,因为我的网络连接未连接(显然是因为 bash 已损坏……?)所以我预订了恢复磁盘并下载了它的 deb 文件 - 但我无法执行 dpkg - 它显示以下内容:
# dpkg -i bash_4.1-2ubuntu3_i386.deb
Selecting previously deselected package bash.
(Reading database ... 22385 files and directories currently installed.)
Preparing to replace bash 4.1-2ubuntu3 (using bash_4.1-2ubuntu3_i386.deb) ...
dpkg: warning: old pre-removal script killed by signal (Segmentation fault)
dpkg - trying script from the new package instead ...
dpkg: error processing bash_4.1-2ubuntu3_i386.deb (--install):
subprocess new pre-removal script killed by signal (Segmentation fault)
dpkg: error while cleaning up:
subprocess installed post-installation script killed by signal (Segmentation fault)
Errors were encountered while processing:
bash_4.1-2ubuntu3_i386.deb
有人有什么建议吗?
答案1
尝试安装bash-static
以避免损坏库的依赖问题并避免删除脚本错误。
如果这也出现类似的错误,则您的共享库可能已损坏。
下一次尝试可能是/bin/bash-static
从 live-cd 复制到/bin/bash
您的系统上。