web-dev-qa-db-fra.com

Dépendance cassée après la mise à jour d'ubuntu 14.04

Je suis récemment passé à Ubuntu 14.04 LTS mais peu de paquets sont cassés. J'ai essayé d'exécuter la commande apt-get -f install et dpkg --configure -a mais rien ne fonctionnait pour moi. S'il vous plaît aider .. voici la sortie de la commande 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)
3
vishgarg

C'est l'indice,

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

Donc, déplacer le fichier /var/lib/samba/secrets.tdb vers un autre emplacement résoudra votre problème,

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

Et puis exécutez la commande ci-dessous pour réparer les dépendances,

Sudo apt-get install -f
4
Avinash Raj