执行 apt-get util-linux 时出现段错误

执行 apt-get util-linux 时出现段错误

我发现我的系统上的许多升级命令和 Apache 都因分段错误而失败。我不知道这是否是主要原因,但很多软件包都依赖于 util-linux:

root@myUbuntuHardyHeronServer:~# apt-get install util-linux
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  util-linux
1 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
20 not fully installed or removed.
Need to get 0B/441kB of archives.
After this operation, 0B of additional disk space will be used.
(Reading database ... 20547 files and directories currently installed.)
Preparing to replace util-linux 2.13.1-5ubuntu2 (using .../util-linux_2.13.1-5ub
untu3.1_i386.deb) ...
Unpacking replacement util-linux ...
Segmentation fault
dpkg: warning - old post-removal script returned error exit status 139
dpkg - trying script from the new package instead ...
Segmentation fault
dpkg: error processing /var/cache/apt/archives/util-linux_2.13.1-5ubuntu3.1_i386
.deb (--unpack):
 subprocess new post-removal script returned error exit status 139
Segmentation fault
dpkg: error while cleaning up:
 subprocess post-removal script returned error exit status 139
Errors were encountered while processing:
 /var/cache/apt/archives/util-linux_2.13.1-5ubuntu3.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

第一种方式: 您必须dpkg package从这里下载packages.ubuntu.com并安装它。

第二种方式: 您必须dpkg package从下载packages.ubuntu.com并解压它,然后 cp dpkg 到/usr/bin

答案2

也许 /var/cache/apt/archives/ 中的文件有问题?尝试运行“aptitude clean”并重试?

相关内容