Broken dependency after upgrading ubuntu 14.04

8,654

This is the clue,

secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst
rename one of them to allow the install/upgrade to continue

So moving the file /var/lib/samba/secrets.tdb to another location will solves your problem,

sudo mv /var/lib/samba/secrets.tdb ~/Desktop

And then run the below command to fix dependencies,

sudo apt-get install -f
Share:
8,654
vishgarg
Author by

vishgarg

Updated on September 18, 2022

Comments

  • vishgarg
    vishgarg over 1 year

    I recently upgraded to ubuntu 14.04 LTS but few packages are broken. I tried to run the command apt-get -f install and dpkg --configure -a but nothing worked for me. Please help .. here is the output of command apt-get -f install

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following extra packages will be installed:
      samba-libs
    The following NEW packages will be installed:
      samba-libs
    0 upgraded, 1 newly installed, 0 to remove and 612 not upgraded.
    5 not fully installed or removed.
    Need to get 0 B/4,101 kB of archives.
    After this operation, 18.3 MB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 267294 files and directories currently installed.)
    Preparing to unpack .../samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb ...
    secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst
    rename one of them to allow the install/upgrade to continue
    http://bugs.debian.org/726472
    /var/lib/samba:
    total 2208
    drwxr-xr-x   7 root root         4096 Apr 18 16:57 .
    drwxr-xr-x  71 root root         4096 Apr 18 16:56 ..
    -rw-------   1 root root       421888 Dec 11 11:30 account_policy.tdb
    -rw-------   1 root root          696 Dec 11 11:30 group_mapping.tdb
    drwxr-x---   2 root root         4096 Apr 18 13:54 ntp_signd
    -rw-------   1 root root       421888 Jan  2 20:45 passdb.tdb
    drwxr-xr-x   6 root root         4096 Apr 18 13:54 private
    -rw-------   1 root root       528384 Jan  2 20:02 registry.tdb
    -rw-------   1 root root       430080 Dec 11 11:30 secrets.tdb
    -rw-------   1 root root       421888 Mar  9 13:46 share_info.tdb
    drwxrwx---+  3 root    3000000   4096 Dec 26 17:27 sysvol
    drwxrwx--T   2 root sambashare   4096 Jan  2 20:28 usershares
    drwxr-x---   2 root root         4096 Apr 18 13:54 winbindd_privileged
    
    /var/lib/samba/private:
    total 10904
    drwxr-xr-x 6 root root    4096 Apr 18 13:54 .
    drwxr-xr-x 7 root root    4096 Apr 18 16:57 ..
    -rw-r--r-- 1 root root    2270 Dec 26 17:28 dns_update_list
    -rw------- 1 root root 1286144 Dec 26 17:27 hklm.ldb
    -rw------- 1 root root 1286144 Dec 26 17:27 idmap.ldb
    -rw-r--r-- 1 root root      92 Dec 26 17:28 krb5.conf
    srwxrwxrwx 1 root root       0 Apr 18 13:54 ldapi
    drwxr-x--- 2 root root    4096 Apr 18 13:54 ldap_priv
    -r--r--r-- 1 root root     200 Jan  2 20:48 named.conf.update
    -rw------- 1 root root 1286144 Dec 26 17:27 privilege.ldb
    -rw------- 1 root root     696 Dec 26 17:28 randseed.tdb
    -rw------- 1 root root 4251648 Dec 26 17:28 sam.ldb
    drwx------ 2 root root    4096 Dec 26 17:27 sam.ldb.d
    -rw------- 1 root root     696 Apr 18 13:54 schannel_store.tdb
    -rw------- 1 root root    1087 Dec 26 17:28 secrets.keytab
    -rw------- 1 root root 1286144 Dec 26 17:28 secrets.ldb
    -rw------- 1 root root  430080 Dec 26 17:28 secrets.tdb
    -rw------- 1 root root 1286144 Dec 26 17:27 share.ldb
    drwxr-xr-x 3 root root    4096 Dec 26 17:28 smbd.tmp
    -rw-r--r-- 1 root root     955 Dec 26 17:28 spn_update_list
    drwxr-xr-x 2 root root    4096 Dec 26 17:28 tls
    dpkg: error processing archive /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb (--unpack):
     subprocess new pre-installation script returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
    • Avinash Raj
      Avinash Raj about 10 years
      post the output of sudo apt-get install -f
    • vishgarg
      vishgarg about 10 years
      dpkg: error processing archive /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_a‌​md64.deb (--unpack): subprocess new pre-installation script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_a‌​md64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
    • Avinash Raj
      Avinash Raj about 10 years
      please post the full output of sudo apt-get install -f command in your question.
    • vishgarg
      vishgarg about 10 years
      the output of the command is dpkg: error processing archive /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_a‌​md64.deb (--unpack): subprocess new pre-installation script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_a‌​md64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
    • Avinash Raj
      Avinash Raj about 10 years
      click this and then post the full output of sudo apt-get install -f
    • Avinash Raj
      Avinash Raj about 10 years
      post the output of dpkg --get-selections | grep samba-libs
    • Avinash Raj
      Avinash Raj about 10 years
      is that the above command displays anything? if yes, then post that.
    • vishgarg
      vishgarg about 10 years
      it displays nothing
    • Avinash Raj
      Avinash Raj about 10 years
      post the full line of secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst
    • vishgarg
      vishgarg about 10 years
      secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst rename one of them to allow the install/upgrade to continue
  • vishgarg
    vishgarg about 10 years
    (part of link group net) doesn't exist; removing from list of alternatives update-alternatives: warning: /etc/alternatives/net is dangling; it will be updated with best choice update-alternatives: warning: alternative /usr/bin/testparm.samba3 (part of link group testparm) doesn't exist; removing from list of alternatives update-alternatives: warning: /etc/alternatives/testparm is dangling; it will be updated with best choice Setting up nautilus-share (0.7.3-1ubuntu5) ... Processing triggers for libc-bin (2.19-0ubuntu6) ...
  • vishgarg
    vishgarg about 10 years
    The output of command apt-get install -f now