升级 ubuntu 14.04 后依赖关系中断

升级 ubuntu 14.04 后依赖关系中断

我最近升级到了 ubuntu 14.04 LTS,但有几个软件包坏了。我尝试运行命令 apt-get -f install 和 dpkg --configure -a,但对我不起作用。请帮忙...这是命令的输出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)

答案1

这是线索,

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

因此将文件移动/var/lib/samba/secrets.tdb到另一个位置将解决您的问题,

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

然后运行以下命令来修复依赖关系,

sudo apt-get install -f

相关内容