Independent of the chosen action, dpkg hangs on my Raspberry Pi 2. It freezes the entire machine, but for example, if htop is already opened in another window, it keeps working.

I tried the most commands like dpkg --configure -a and I would prefer not to reset my entire system. The strace log is too long for pastebin, but it ends some thousand times with two lines.

pselect6(16, [0 13 15], NULL, NULL, {tv_sec=0, tv_nsec=50000000}, {[], 8}) = 0 (Timeout)
wait4(3278, 0x7ea6c884, WNOHANG, NULL)  = 0

Can somebody help?


Your dpkg is waiting for a child process. It is visible from that it is in a wait4() syscall. Not he hangs, but a child process, probably a configuration script does.

Check what is going with a

pstree -pa

and strace this. Being a good linuxer, I think you could use also the lsof command smartly. Strace has also a -f flag, with it you can trace child processes, too.

It can be also useful to manually hotfix the configuration scripts in order to make the purging of the bad packages possible.

Most dpkg/apt commands you try to use are probably trying to configure the currently unconfigured packages on your system, this is why you hit always this bad or buggy configuration script.

Is your syslogd running? Sometimes a tool called by the config script can't accept that it is not available.

The config scripts are in /var/lib/dpkg/info . I say only silently, if you find a particularly crappy one, it can be easier to simply delete as hotfix it, but I am really silent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.