3

During the upgrade process the upgrade process halted and I can not restart the updater. It seems to be related to samba. I ran sudo apt-get install -f and got the following result:

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)

I then ran dpkg --configure --pending and got these results:

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

I am not sure where to go from here

  • /usr/share/php/Archive/Tar.php can't open tgz files because line 734 is returning "false" when checking for gzopen. Google has a 5 year old bug (still open) that may be related: bugs.launchpad.net/ubuntu/+source/php5/+bug/451405 The solution is to find and replace the following in Tar.php: * Replace 'gzopen' with 'gzopen64' * Replace 'gzseek' with 'gzseek64' * Replace 'gztell' with 'gztell64' – jarederaj Nov 21 '14 at 21:18
3

It tells you why it stopped.

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

And gives you a reference here: http://bugs.debian.org/726472

Basically, you should rename /var/lib/samba/secrets.tdb to something like /var/lib/samba/secrets.tdb.old and then try the sudo apt-get install -f

This is because the location of secrets.tdb changed from /var/lib/samba to /var/lib/samba/private, but the old file is still there.

| improve this answer | |
1

Read nattgew's answer first, this is a workaround only

You could wait until there is a newer release of samba-libs, possibly fixing this bug.

Another possibility (if you don't need samba for the time being) is to fetch the file /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb, opening it up (mc is the easiest way to do that, but going oldschool with ar + tar is also an option), and placing an 'exit 0' at the beginning of the pre-install script, then using dpkg -i on the patched version and continue normally with apt-get -f install.

This is generally how you can avoid broken pre/post-install scripts in packages that lots are depending on.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.