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?

JoKeR
  • 7,062
mattm
  • 190
  • 3
  • 13

2 Answers2

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
JoKeR
  • 7,062
Yolateng0
  • 51
  • 8
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);