12

Whenever I try to update my pi using sudo apt-get update && sudo apt-get upgrade it will often hang at some point during the installation. It's been different ones each time, but the last was pulse audio.

Furthermore, I am able to ping the pi and an ssh appears to connect, but never gives me a prompt. I've had another terminal open at the same time and top shows the CPU around 90+%

Has anyone else encountered this?

I can attach logs once I am able.

whotyjones
  • 129
  • 1
  • 1
  • 3

3 Answers3

4

I also had a problem with a hanging update. The reason was the power source. I had a 400mA power source that was to low for the RaspberrPi. I've changed to 1000mA and it was running nicely. Perhaps you can check that?

mica
  • 41
  • 1
3

Updating the system is an I/O-intensive operation. The OS does not immediately write data to the SD card, instead it will buffer it in the RAM. At some point, it will try to write these buffers to the SD card. Since the SD card is not fast enough the OS will look unresponsive when flushing buffers.

Another possibility is that your system is running out of memory, thereby causing swapping. If you do not have swap space, the OS will start killing random processes. If you do have swap, but on slow media, it will still take some time before processes can continue.

Lekensteyn
  • 1,521
  • 1
  • 15
  • 24
0

It failed for me upgrading a Raspberry Pi 2 W when upgrading the wpasupplicant when using the command 'sudo apt-upgrade -y'. When I used 'sudo upgrade -y' it worked the first time.

MikeM
  • 1