Raspberry dpkg“文件列表文件包'<pck_name>'缺失并且无法分配内存

时间:2017-07-13 07:25:07

标签: configuration raspberry-pi raspbian apt-get dpkg

我有以下问题: 当我尝试

 apt-get upgrade

我收到一些dpkg警告,(附图片)。

dpkg: warning: files list file for package 'php5-json' missing; assuming package has no files currently installed 
dpkg: warning: files list file for package 'php5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-readline' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-cli' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting: 
    failed to allocate memory: cannot allocate memory
E: Sub-process /usr/bin/dpkg returned an error code (2)

当我尝试安装这些单一包时,以及当我尝试删除它们时,也会发生这种情况。我也试图删除整个apache2和php5包没有成功。 apt-get autoremove和autoclean以及更新和升级都不会改变结果。

我在SD卡上有一些可用空间,我尝试了一些类似问题的解决方案:

尝试手动删除/ var / cache / apt / archives /中的.deb文件,如解释here

尝试按照here

所述强制重新安装

还尝试了一堆类似的解决方案,但没有成功......

拜托,有人能指出我正确的方向吗?此问题导致启动apache2时出错,我无法使用我的网站。

谢谢!

enter image description here

1 个答案:

答案 0 :(得分:1)

尝试sudo apt-get install -f修复您的依赖项

同样sudo dpkg --configure -a来修复您的装置