尝试从 13.10 升级到 14.04 时,升级暂停于“中止 samba-libs preinst”

尝试从 13.10 升级到 14.04 时,升级暂停于“中止 samba-libs preinst”

在升级过程中,升级过程停止了,我无法重新启动更新程序。这似乎与 samba 有关。我运行了 sudo apt-get install -f 并得到了以下结果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  attr bind9 bind9utils blt consolekit dvgrab icoutils kate-data katepart
  kde-l10n-engb kde-runtime-data kdelibs-bin kdelibs5-data kdelibs5-plugins
  kdenlive-data kdoctools ldb-tools libamd2.2.0 libattica0.4 libbaloocore4
  libbaloofiles4 libbalooxapian4 libboost-filesystem1.53.0
  libboost-locale1.53.0 libboost-program-options1.53.0 libboost-regex1.53.0
  libboost-thread1.53.0 libck-connector0 libdb5.1:i386 libebml4 libepub0
  libffms2-2 libfftw3-3 libfftw3-long3 libgpac2 libgraphicsmagick3
  libhdb9-heimdal libiso9660-8 libjs-yui libkactivities-bin
  libkactivities-models1 libkactivities6 libkatepartinterfaces4 libkcmutils4
  libkdc2-heimdal libkde3support4 libkdeclarative5 libkdesu5 libkdeui5
  libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5 libkidletime4
  libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4 libkms1 libknewstuff3-4
  libknotifyconfig4 libkntlm4 libkparts4 libkpty4 libkrosscore4
  libktexteditor4 libkubuntu0 libkxmlrpcclient4 liblcms1:i386 libllvm3.3:i386
  libmatroska6 libmjpegutils-2.0-0 libmng1:i386 libmozjs185-1.0
  libmpeg2encpp-2.0-0 libmplex2-2.0-0 libnepomuk4 libnepomukcleaner4
  libnepomukcore4abi1 libnepomukquery4a libnepomukutils4 libntrack-qt4-1
  libntrack0 libopenimageio1.1 libpam-ck-connector libphonon4 libplasma3
  libpolkit-qt-1-1 libpoppler-qt4-4 libpthread-stubs0 libqapt2
  libqapt2-runtime libqca2 libqjson0 libqmobipocket1 libqt4-qt3support
  libsolid4 libsoprano4 libstreamanalyzer0 libstreams0 libtasn1-3:i386
  libtcl8.5 libthreadweaver4 libtk8.5 libumfpack5.4.0 libuser1 libvcdinfo0
  libvirtodbc0 libwebp4 libxcb-xv0 libxine1-x libxine2-bin libxine2-doc
  libxine2-ffmpeg libxine2-misc-plugins libxine2-plugins libxine2-x lsdvd
  mkvtoolnix nepomuk-core-data nepomuk-core-runtime ntrack-module-libnl-0
  nvidia-settings-319 ogmtools oxygen-icon-theme pear-symfony-project-channel
  phonon phonon-backend-gstreamer phonon-backend-gstreamer-common
  php-symfony-yaml plasma-scriptengine-javascript pv python-central
  python-dnspython python-libuser python-xkit recordmydesktop
  shared-desktop-ontologies soprano-daemon swh-plugins tcl8.5 tdb-tools tk8.5
  virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common
Use 'apt-get autoremove' to remove them.
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 3 not upgraded.
7 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 ... 405272 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 12:41 .
drwxr-xr-x  79 root root         4096 Apr 18 12:48 ..
-rw-------   1 root root       421888 Dec 26 22:44 account_policy.tdb
-rw-------   1 root root          696 Dec 26 22:44 group_mapping.tdb
drwxr-x---   2 root root         4096 Apr 17 21:55 ntp_signd
-rw-------   1 root root       421888 Dec 26 22:44 passdb.tdb
drwxr-xr-x   6 root root         4096 Apr 17 21:55 private
-rw-------   1 root root       528384 Dec 26 22:44 registry.tdb
-rw-------   1 root root       430080 Dec 26 22:44 secrets.tdb
-rw-------   1 root root       421888 Dec 26 22:44 share_info.tdb
drwxrwx---+  3 root    3000000   4096 Dec 27 13:17 sysvol
drwxrwx--T   2 root sambashare   4096 Dec 26 22:44 usershares
drwxr-x---   2 root root         4096 Apr 17 21:55 winbindd_privileged

/var/lib/samba/private:
total 10904
drwxr-xr-x 6 root root    4096 Apr 17 21:55 .
drwxr-xr-x 7 root root    4096 Apr 18 12:41 ..
-rw-r--r-- 1 root root    2270 Dec 27 13:18 dns_update_list
-rw------- 1 root root 1286144 Dec 27 13:17 hklm.ldb
-rw------- 1 root root 1286144 Dec 27 13:17 idmap.ldb
-rw-r--r-- 1 root root      92 Dec 27 13:18 krb5.conf
srwxrwxrwx 1 root root       0 Apr 17 21:55 ldapi
drwxr-x--- 2 root root    4096 Apr 17 21:55 ldap_priv
-r--r--r-- 1 root root     230 Dec 27 13:18 named.conf.update
-rw------- 1 root root 1286144 Dec 27 13:17 privilege.ldb
-rw------- 1 root root     696 Dec 27 13:18 randseed.tdb
-rw------- 1 root root 4251648 Dec 27 13:18 sam.ldb
drwx------ 2 root root    4096 Dec 27 13:17 sam.ldb.d
-rw------- 1 root root     696 Apr 17 21:55 schannel_store.tdb
-rw------- 1 root root    1207 Dec 27 13:18 secrets.keytab
-rw------- 1 root root 1286144 Dec 27 13:18 secrets.ldb
-rw------- 1 root root  430080 Dec 27 13:18 secrets.tdb
-rw------- 1 root root 1286144 Dec 27 13:17 share.ldb
drwxr-xr-x 3 root root    4096 Dec 27 13:18 smbd.tmp
-rw-r--r-- 1 root root     955 Dec 27 13:18 spn_update_list
drwxr-xr-x 2 root root    4096 Dec 27 13:18 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)

然后我运行 dpkg --configure --pending 并得到以下结果:

dpkg: dependency problems prevent configuration of libsmbclient:amd64:
 libsmbclient:amd64 depends on samba-libs (= 2:4.1.6+dfsg-1ubuntu2); however:
  Package samba-libs:amd64 is not installed.

dpkg: error processing package libsmbclient:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-samba:
 python-samba depends on samba-libs (= 2:4.1.6+dfsg-1ubuntu2); however:
  Package samba-libs:amd64 is not installed.

dpkg: error processing package python-samba (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of samba-common-bin:
 samba-common-bin depends on python-samba; however:
  Package python-samba is not configured yet.
 samba-common-bin depends on samba-libs (= 2:4.1.6+dfsg-1ubuntu2); however:
  Package samba-libs:amd64 is not installed.

dpkg: error processing package samba-common-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nautilus-share:
 nautilus-share depends on samba-common-bin | samba-common (<< 2:3.4.0~pre2-1~0); however:
  Package samba-common-bin is not configured yet.
  Version of samba-common on system is 2:4.1.6+dfsg-1ubuntu2.

dpkg: error processing package nautilus-share (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs-backends:
 gvfs-backends depends on libsmbclient (>= 2:4.0.3+dfsg1); however:
  Package libsmbclient:amd64 is not configured yet.

dpkg: error processing package gvfs-backends (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-center:
 software-center depends on gvfs-backends; however:
  Package gvfs-backends is not configured yet.

dpkg: error processing package software-center (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on software-center; however:
  Package software-center is not configured yet.

dpkg: error processing package ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libsmbclient:amd64
 python-samba
 samba-common-bin
 nautilus-share
 gvfs-backends
 software-center
 ubuntu-desktop

我不知道接下来该去哪里

答案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

并在这里给你一个参考: http://bugs.debian.org/726472

基本上,你应该重命名/var/lib/samba/secrets.tdb为类似的东西/var/lib/samba/secrets.tdb.old,然后尝试sudo apt-get install -f

这是因为 的位置secrets.tdb已从 更改/var/lib/samba/var/lib/samba/private,但旧文件仍然存在。

答案2

首先阅读 nattgew 的回答,这只是一种解决方法

您可以等到 samba-libs 发布新版本,也许会修复这个错误。

另一种可能性(如果您暂时不需要 samba)是获取文件 /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb,打开它(mc 是最简单的方法,但使用 ar + tar 也是一个选择),并在预安装脚本的开头放置一个“exit 0”,然后在修补版本上使用 dpkg -i 并继续使用 apt-get -f install 正常安装。

这通常可以避免许多所依赖的软件包中的安装前/安装后脚本损坏。

相关内容