由于apache2安装损坏,无法安装任何其他软件包。无法分配内存

时间:2020-02-18 16:23:17

标签: linux apache2 apt apt-get amazon-lightsail

因此,当尝试在我的lightail实例(Ubuntu,512M RAM)中安装新软件包时,我看到了此消息

ubuntu@ip-172-26-12-45:~$ sudo apt-get install certbot
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

所以我做了显而易见的尝试,尝试了sudo dpkg --configure -a,我看到Apache2卡在了那里。我根本不需要Apache2!

ubuntu@ip-172-26-12-45:~$ sudo dpkg --configure -a
dpkg: error processing package apache2 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 apache2

我做的所有事(apt-get / dpkg)通常都会返回

ubuntu@ip-172-26-12-45:~$ sudo apt-get -f install
...
Preparing to unpack .../apache2_2.4.18-2ubuntu3.14_amd64.deb ...
dpkg: unrecoverable fatal error, aborting:
 fork failed: Cannot allocate memory
E: Sub-process /usr/bin/dpkg returned an error code (2)

感觉就像卡在兔子的洞里一样,因为它不断抛出错误,所以我也无法删除apache2

dpkg: unrecoverable fatal error, aborting:
fork failed: Cannot allocate memory

我能做什么吗?真的停滞了很长时间-香港专业教育学院用尽了所有在线可用选项。目前,我还没有增加RAM的奢望。 这是当前的内存状态-

ubuntu@ip-172-26-12-45:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:            486         222          81          14         182         207
Swap:             0           0           0

任何帮助都非常重要!

0 个答案:

没有答案