Ao tentar atualizar de 13.10 para 14.04, a atualização parou em “aborting samba-libs preinst” [closed]

3

Durante o processo de atualização, o processo de atualização parou e não consigo reiniciar o atualizador. Parece estar relacionado ao samba. Eu rodei o sudo apt-get install -f e obtive o seguinte resultado:

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)

Eu então executei o dpkg --configure --pending e obtive estes resultados:

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

Não sei ao certo para onde ir a partir daqui

    
por user270630 18.04.2014 / 23:26

2 respostas

3

Diz por que parou.

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

E lhe dá uma referência aqui: link

Basicamente, você deve renomear /var/lib/samba/secrets.tdb para algo como /var/lib/samba/secrets.tdb.old e, em seguida, tentar o sudo apt-get install -f

Isso ocorre porque a localização de secrets.tdb mudou de /var/lib/samba para /var/lib/samba/private , mas o arquivo antigo ainda está lá.

    
por Nattgew 18.04.2014 / 23:59
1

Leia primeiro a resposta da nattgew, esta é apenas uma solução alternativa

Você pode esperar até que haja uma versão mais recente de samba-libs, possivelmente corrigindo esse bug.

Outra possibilidade (se você não precisa do samba por enquanto) é buscar o arquivo /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb, abrindo-o ( mc é a maneira mais fácil de fazer isso, mas ir ao oldschool com ar + tar também é uma opção), e colocar uma 'exit 0' no início do script de pré-instalação, usando dpkg -i na versão com patch e continuar normalmente com o apt-get -f install.

Geralmente é assim que você pode evitar scripts quebrados de pré / pós-instalação em pacotes dos quais os lotes dependem.

    
por Agoston Horvath 19.04.2014 / 00:02