3

I am having trouble doing a software update on 14.04.

sudo apt-get update
sudo apt-get upgrade

The terminal hangs indefinitely after outputting:

Setting up bluez (5.23-2ubuntu0trusty1) ...

I have tried rebooting the machine, but any further updates are met with this message:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

Running:

sudo dpkg --configure -a 

Results in the same problem:

Setting up bluez (5.23-2ubuntu0trusty1) ...  

Is there a known problem with bluez? Or is there a workaround for problem packages during updates?

0

2 Answers 2

0

It appears the code to run bluetoothd as a daemon is missing in the 5.x releases. I just added the code from 4.x and it worked. See the patch below.

diff --git a/src/main.c b/src/main.c
index 4c94a69..979521e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -583,6 +583,13 @@ int main(int argc, char *argv[])
                exit(0);
        }

+        if (option_detach == TRUE) {
+                if (daemon(0, 0)) {
+                        perror("Can't start daemon");
+                        exit(1);
+                }
+        }
+
        umask(0077);

        event_loop = g_main_loop_new(NULL, FALSE);
1
  • So I ran sudo apt-get source bluetooth and when into the source directory to modify main.c. I would then need to compile it and install the package. Would I have to do this each time there is an update?
    – nocode
    May 31, 2016 at 20:01
0

1/ Firstly

sudo dpkg --configure -a 
sudo apt-get update && sudo apt-get upgrade -y

2/ if it does not work:

sudo apt-get install -f 
sudo apt-get update && sudo apt-get upgrade -y

3/if it does not work:

sudo dpkg --force-all --configure -a 
sudo apt-get update && sudo apt-get upgrade -y

4/ if it does not work:

sudo dpkg -P --force-all bluez 
sudo apt-get update && sudo apt-get upgrade -y
3
  • Unfortunately this does not work; all of the dpkg commands hang indefinitely. It looks like the installation scripts for dpkg have some kind of problem.
    – mattm
    Apr 15, 2015 at 18:34
  • It appears the real problem is a disk failure. Thanks for the pointers though.
    – mattm
    Apr 15, 2015 at 19:05
  • I've installed BlueZ 5.30 from source and found that bluetoothd does not run in the background. It should, which is probably why you are seeing this problem. I haven't found a fix yet. May 30, 2015 at 11:07

Not the answer you're looking for? Browse other questions tagged .