如何在Ubuntu中重新安装bash?

bash似乎在抛出segfault,而我的系统非常坏。 我想重新安装bash,而不是重新安装整个操作系统,但这显然是非平凡的。 我不能使用apt-get,因为我的networking连接没有连接(显然是由于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 

有人有任何build议?

尝试安装bash-static以避免依赖问题,并破坏删除脚本错误。

如果这也失败了类似的错误您的共享库可能被打破。

下一个尝试可能是将/bin/bash-static从live-cd复制到系统上的/bin/bash