Raspbian无法正确更新

时间:2018-09-14 06:26:27

标签: raspberry-pi ubuntu-14.04 raspbian

突然我的RaspberryPi无法正确升级。 apt提供以下错误消息。有谁能解决这个问题。    以下是错误消息

dpkg-deb: error: subprocess tar was killed by signal (Segmentation fault)
    Traceback (most recent call last):
      File "/usr/bin/apt-listchanges", line 250, in <module>
        main()
      File "/usr/bin/apt-listchanges", line 108, in main
        pkg = DebianFiles.Package(deb)
      File "/usr/share/apt-listchanges/DebianFiles.py", line 134, in __init__
        self.binary  = pkgdata.Package
    AttributeError: ControlStanza instance has no attribute 'Package'

1 个答案:

答案 0 :(得分:0)

我已经找到原因并解决了问题。

步骤

1)使用此命令捕获跟踪日志。

 sudo strace -f -e trace=execve apt-get -y upgrade > execlist 2>&1

2)检查execlist文件并注意以下错误消息

[pid 27534] execve("/usr/local/sbin/tar", ["tar", "-x", "-m", "-f", "-", "--warning=no-timestamp"], [/* 17 vars */]) = -1 ENOENT (No such file or directory)
[pid 27534] execve("/usr/local/bin/tar", ["tar", "-x", "-m", "-f", "-", "--warning=no-timestamp"], [/* 17 vars */]) = -1 ENOENT (No such file or directory)
[pid 27534] execve("/usr/sbin/tar", ["tar", "-x", "-m", "-f", "-", "--warning=no-timestamp"], [/* 17 vars */]) = -1 ENOENT (No such file or directory)
[pid 27534] execve("/usr/bin/tar", ["tar", "-x", "-m", "-f", "-", "--warning=no-timestamp"], [/* 17 vars */]) = -1 ENOENT (No such file or directory)
[pid 27534] execve("/sbin/tar", ["tar", "-x", "-m", "-f", "-", "--warning=no-timestamp"], [/* 17 vars */]) = -1 ENOENT (No such file or directory)
[pid 27534] execve("/bin/tar", ["tar", "-x", "-m", "-f", "-", "--warning=no-timestamp"], [/* 17 vars */]) = 0
[pid 27533] +++ exited with 0 +++
[pid 27532] +++ exited with 0 +++
[pid 27531] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27533, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
[pid 27534] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x638aa} ---
[pid 27534] +++ killed by SIGSEGV +++

3)程序tar似乎有问题。

4)在另一台服务器上下载新的tar程序并替换它。

问题解决了。