apt-get install cifs-utils corrupted system libraries — caused chaos

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















My Linux libraries seem to have suffered a severe corruption just after running (as root):



apt-get install cifs-utils



I need to correct the corruption or restore the original libraries.



Note: I should avoid re-installation of Linux as this is a NAS (WDMyCloud 3TB running Debian Jessie)



Linux WDMyCloud 3.2.26 #1 SMP Thu Jul 9 11:14:15 PDT 2015 wd-2.4-rel armv7l GNU/Linux



Output



Some lines truncated for brevity.



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libarchive13 libasn1-8-heimdal libbsd0 libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal
libhdb9-heimdal libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libnss-winbind libntdb1
libp11-kit0 libpam-winbind libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient
libtalloc2 libtasn1-6 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python python-crypto python-dnspython python-ldb python-minimal
python-ntdb python-samba python-talloc python-tdb python2.7 python2.7-minimal samba samba-common samba-common-bin samba-dsdb-modules
samba-libs smbclient tdb-tools update-inetd winbind
Suggested packages:
lrzip cups-common gnutls-bin python-doc python-tk python-crypto-dbg python-crypto-doc python2.7-doc binutils binfmt-support bind9
bind9utils ctdb ldb-tools ntp smbldap-tools heimdal-clients
Recommended packages:
samba-vfs-modules
The following NEW packages will be installed:
libarchive13 libasn1-8-heimdal libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal libhdb9-heimdal
libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libntdb1 libpython-stdlib libpython2.7
libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient libtasn1-6 libtevent0 libwind0-heimdal python-crypto
python-dnspython python-ldb python-ntdb python-samba python-talloc python-tdb samba samba-dsdb-modules samba-libs tdb-tools update-inetd
The following packages will be upgraded:
cifs-utils libbsd0 libnss-winbind libp11-kit0 libpam-winbind libtalloc2 libtdb1 libwbclient0 python python-minimal python2.7
python2.7-minimal samba-common samba-common-bin smbclient winbind
16 upgraded, 37 newly installed, 0 to remove and 270 not upgraded.
2 not fully installed or removed.
Need to get 16.8 MB of archives.
After this operation, 8412 kB disk space will be freed.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.us.debian.org/debian/ jessie/main python2.7 armhf 2.7.9-2+deb8u1 [252 kB]
Get:2 http://ftp.us.debian.org/debian/ jessie/main python2.7-minimal armhf 2.7.9-2+deb8u1 [1152 kB]
...

Get:53 http://ftp.us.debian.org/debian/ jessie/main cifs-utils armhf 2:6.4-1 [66.7 kB]
Fetched 16.8 MB in 10s (1601 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 25724 files and directories currently installed.)
Preparing to unpack .../python2.7_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7 (2.7.9-2+deb8u1) over (2.7.3-6) ...
Preparing to unpack .../python2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7-minimal (2.7.9-2+deb8u1) over (2.7.3-6) ...
dpkg: warning: unable to delete old directory '/etc/python2.7': Directory not empty
Selecting previously unselected package libpython2.7-minimal:armhf.
Preparing to unpack .../libpython2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.9-2+deb8u1) ...
Selecting previously unselected package libffi6:armhf.
...

Preparing to unpack .../winbind_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
[ ok ] Stopping the Winbind daemon: winbind.
Unpacking winbind (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Selecting previously unselected package samba-libs:armhf.
...

Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Selecting previously unselected package libsmbclient:armhf.
Preparing to unpack .../libsmbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking libsmbclient:armhf (2:4.2.14+dfsg-0+deb8u9) ...
Preparing to unpack .../smbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking smbclient (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Preparing to unpack .../samba-common_2%3a4.2.14+dfsg-0+deb8u9_all.deb ...
Unpacking samba-common (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
dpkg: warning: unable to delete old directory '/etc/dhcp3/dhclient-enter-hooks.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/dhcp3': Directory not empty
Preparing to unpack .../cifs-utils_2%3a6.4-1_armhf.deb ...
Unpacking cifs-utils (2:6.4-1) over (2:5.5-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Impact



Many utilities now abort abnormally. E.g. mount aborts with message Killed!



WDMyCloud:/nfs/Public# mount.cifs '\192.168.1.7WD_3TB' /mnt/SEAGATE8TB/WD_3TB cifs -o user=username,workgroup=WORKGROUP,password=pwd

Killed

WDMyCloud:/nfs/Public# smbtree
smbtree: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned



The NAS DLNA server got corrupted too. Luckily I have a full backup of the entire NAS data (not system). However, I would like to avoid having to factory reset the device and redo all the configs...



Attempts to Fix it



apt-get -f install did not fix it.



WDMyCloud-Issam:~# apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
bind9 bind9utils ctdb ldb-tools ntp smbldap-tools
The following NEW packages will be installed:
samba
0 upgraded, 1 newly installed, 0 to remove and 270 not upgraded.
53 not fully installed or removed.
Need to get 0 B/958 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
(Reading database ... 26719 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


WDMyCloud-Issam:~# apt-cache policy cifs-utils
cifs-utils:
Installed: 2:6.4-1
Candidate: 2:6.4-1
Version table:
*** 2:6.4-1 0
500 http://ftp.us.debian.org/debian/ jessie/main armhf Packages
100 /var/lib/dpkg/status
WDMyCloud:~# modprobe cifs


Maybe smth to do with winbind?



WDMyCloud:~# sudo apt-get install cifs-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
cifs-utils is already the newest version.
cifs-utils set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
winbind : Depends: samba (= 2:4.2.14+dfsg-0+deb8u9) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Also looked up the ask ubuntu thread "Trying to install cifs-utils - the attempt created dependency hell" but couldn't figure out a resolution from it.



Any idea how to proceed?










share|improve this question
























  • To me this stands out; looks to me like WD have rolled their own samba (wild guess) and packaged it under a different name? dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack): trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723 ....

    – tink
    Mar 2 at 5:31











  • Not sure. The installation prep log above states: **The following packages will be upgraded**: cifs-utils ... python2.7 python2.7-minimal samba-common samba-common-bin smbclient winbind . The first anomaly during the installation is related to one of these packages (python2.7-minimal). However, I don't see that any existing package files have been corrupted, except for winbind daemon which was stopped. WDMyCloud-~# service winbind status -> [FAIL] winbind is not running ... failed!. Shall I start winbind and see!?

    – Issam A.
    Mar 2 at 18:36












  • WDMyCloud:~# service winbind start -> [....] Starting the Winbind daemon: winbindchgrp: invalid group: 'winbindd_priv' n /etc/init.d/winbind: line 35: return: can only 'return' from a function or sourced script n /usr/sbin/winbindd: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned n failed!

    – Issam A.
    Mar 2 at 18:46
















0















My Linux libraries seem to have suffered a severe corruption just after running (as root):



apt-get install cifs-utils



I need to correct the corruption or restore the original libraries.



Note: I should avoid re-installation of Linux as this is a NAS (WDMyCloud 3TB running Debian Jessie)



Linux WDMyCloud 3.2.26 #1 SMP Thu Jul 9 11:14:15 PDT 2015 wd-2.4-rel armv7l GNU/Linux



Output



Some lines truncated for brevity.



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libarchive13 libasn1-8-heimdal libbsd0 libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal
libhdb9-heimdal libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libnss-winbind libntdb1
libp11-kit0 libpam-winbind libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient
libtalloc2 libtasn1-6 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python python-crypto python-dnspython python-ldb python-minimal
python-ntdb python-samba python-talloc python-tdb python2.7 python2.7-minimal samba samba-common samba-common-bin samba-dsdb-modules
samba-libs smbclient tdb-tools update-inetd winbind
Suggested packages:
lrzip cups-common gnutls-bin python-doc python-tk python-crypto-dbg python-crypto-doc python2.7-doc binutils binfmt-support bind9
bind9utils ctdb ldb-tools ntp smbldap-tools heimdal-clients
Recommended packages:
samba-vfs-modules
The following NEW packages will be installed:
libarchive13 libasn1-8-heimdal libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal libhdb9-heimdal
libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libntdb1 libpython-stdlib libpython2.7
libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient libtasn1-6 libtevent0 libwind0-heimdal python-crypto
python-dnspython python-ldb python-ntdb python-samba python-talloc python-tdb samba samba-dsdb-modules samba-libs tdb-tools update-inetd
The following packages will be upgraded:
cifs-utils libbsd0 libnss-winbind libp11-kit0 libpam-winbind libtalloc2 libtdb1 libwbclient0 python python-minimal python2.7
python2.7-minimal samba-common samba-common-bin smbclient winbind
16 upgraded, 37 newly installed, 0 to remove and 270 not upgraded.
2 not fully installed or removed.
Need to get 16.8 MB of archives.
After this operation, 8412 kB disk space will be freed.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.us.debian.org/debian/ jessie/main python2.7 armhf 2.7.9-2+deb8u1 [252 kB]
Get:2 http://ftp.us.debian.org/debian/ jessie/main python2.7-minimal armhf 2.7.9-2+deb8u1 [1152 kB]
...

Get:53 http://ftp.us.debian.org/debian/ jessie/main cifs-utils armhf 2:6.4-1 [66.7 kB]
Fetched 16.8 MB in 10s (1601 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 25724 files and directories currently installed.)
Preparing to unpack .../python2.7_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7 (2.7.9-2+deb8u1) over (2.7.3-6) ...
Preparing to unpack .../python2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7-minimal (2.7.9-2+deb8u1) over (2.7.3-6) ...
dpkg: warning: unable to delete old directory '/etc/python2.7': Directory not empty
Selecting previously unselected package libpython2.7-minimal:armhf.
Preparing to unpack .../libpython2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.9-2+deb8u1) ...
Selecting previously unselected package libffi6:armhf.
...

Preparing to unpack .../winbind_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
[ ok ] Stopping the Winbind daemon: winbind.
Unpacking winbind (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Selecting previously unselected package samba-libs:armhf.
...

Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Selecting previously unselected package libsmbclient:armhf.
Preparing to unpack .../libsmbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking libsmbclient:armhf (2:4.2.14+dfsg-0+deb8u9) ...
Preparing to unpack .../smbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking smbclient (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Preparing to unpack .../samba-common_2%3a4.2.14+dfsg-0+deb8u9_all.deb ...
Unpacking samba-common (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
dpkg: warning: unable to delete old directory '/etc/dhcp3/dhclient-enter-hooks.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/dhcp3': Directory not empty
Preparing to unpack .../cifs-utils_2%3a6.4-1_armhf.deb ...
Unpacking cifs-utils (2:6.4-1) over (2:5.5-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Impact



Many utilities now abort abnormally. E.g. mount aborts with message Killed!



WDMyCloud:/nfs/Public# mount.cifs '\192.168.1.7WD_3TB' /mnt/SEAGATE8TB/WD_3TB cifs -o user=username,workgroup=WORKGROUP,password=pwd

Killed

WDMyCloud:/nfs/Public# smbtree
smbtree: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned



The NAS DLNA server got corrupted too. Luckily I have a full backup of the entire NAS data (not system). However, I would like to avoid having to factory reset the device and redo all the configs...



Attempts to Fix it



apt-get -f install did not fix it.



WDMyCloud-Issam:~# apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
bind9 bind9utils ctdb ldb-tools ntp smbldap-tools
The following NEW packages will be installed:
samba
0 upgraded, 1 newly installed, 0 to remove and 270 not upgraded.
53 not fully installed or removed.
Need to get 0 B/958 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
(Reading database ... 26719 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


WDMyCloud-Issam:~# apt-cache policy cifs-utils
cifs-utils:
Installed: 2:6.4-1
Candidate: 2:6.4-1
Version table:
*** 2:6.4-1 0
500 http://ftp.us.debian.org/debian/ jessie/main armhf Packages
100 /var/lib/dpkg/status
WDMyCloud:~# modprobe cifs


Maybe smth to do with winbind?



WDMyCloud:~# sudo apt-get install cifs-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
cifs-utils is already the newest version.
cifs-utils set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
winbind : Depends: samba (= 2:4.2.14+dfsg-0+deb8u9) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Also looked up the ask ubuntu thread "Trying to install cifs-utils - the attempt created dependency hell" but couldn't figure out a resolution from it.



Any idea how to proceed?










share|improve this question
























  • To me this stands out; looks to me like WD have rolled their own samba (wild guess) and packaged it under a different name? dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack): trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723 ....

    – tink
    Mar 2 at 5:31











  • Not sure. The installation prep log above states: **The following packages will be upgraded**: cifs-utils ... python2.7 python2.7-minimal samba-common samba-common-bin smbclient winbind . The first anomaly during the installation is related to one of these packages (python2.7-minimal). However, I don't see that any existing package files have been corrupted, except for winbind daemon which was stopped. WDMyCloud-~# service winbind status -> [FAIL] winbind is not running ... failed!. Shall I start winbind and see!?

    – Issam A.
    Mar 2 at 18:36












  • WDMyCloud:~# service winbind start -> [....] Starting the Winbind daemon: winbindchgrp: invalid group: 'winbindd_priv' n /etc/init.d/winbind: line 35: return: can only 'return' from a function or sourced script n /usr/sbin/winbindd: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned n failed!

    – Issam A.
    Mar 2 at 18:46














0












0








0








My Linux libraries seem to have suffered a severe corruption just after running (as root):



apt-get install cifs-utils



I need to correct the corruption or restore the original libraries.



Note: I should avoid re-installation of Linux as this is a NAS (WDMyCloud 3TB running Debian Jessie)



Linux WDMyCloud 3.2.26 #1 SMP Thu Jul 9 11:14:15 PDT 2015 wd-2.4-rel armv7l GNU/Linux



Output



Some lines truncated for brevity.



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libarchive13 libasn1-8-heimdal libbsd0 libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal
libhdb9-heimdal libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libnss-winbind libntdb1
libp11-kit0 libpam-winbind libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient
libtalloc2 libtasn1-6 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python python-crypto python-dnspython python-ldb python-minimal
python-ntdb python-samba python-talloc python-tdb python2.7 python2.7-minimal samba samba-common samba-common-bin samba-dsdb-modules
samba-libs smbclient tdb-tools update-inetd winbind
Suggested packages:
lrzip cups-common gnutls-bin python-doc python-tk python-crypto-dbg python-crypto-doc python2.7-doc binutils binfmt-support bind9
bind9utils ctdb ldb-tools ntp smbldap-tools heimdal-clients
Recommended packages:
samba-vfs-modules
The following NEW packages will be installed:
libarchive13 libasn1-8-heimdal libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal libhdb9-heimdal
libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libntdb1 libpython-stdlib libpython2.7
libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient libtasn1-6 libtevent0 libwind0-heimdal python-crypto
python-dnspython python-ldb python-ntdb python-samba python-talloc python-tdb samba samba-dsdb-modules samba-libs tdb-tools update-inetd
The following packages will be upgraded:
cifs-utils libbsd0 libnss-winbind libp11-kit0 libpam-winbind libtalloc2 libtdb1 libwbclient0 python python-minimal python2.7
python2.7-minimal samba-common samba-common-bin smbclient winbind
16 upgraded, 37 newly installed, 0 to remove and 270 not upgraded.
2 not fully installed or removed.
Need to get 16.8 MB of archives.
After this operation, 8412 kB disk space will be freed.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.us.debian.org/debian/ jessie/main python2.7 armhf 2.7.9-2+deb8u1 [252 kB]
Get:2 http://ftp.us.debian.org/debian/ jessie/main python2.7-minimal armhf 2.7.9-2+deb8u1 [1152 kB]
...

Get:53 http://ftp.us.debian.org/debian/ jessie/main cifs-utils armhf 2:6.4-1 [66.7 kB]
Fetched 16.8 MB in 10s (1601 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 25724 files and directories currently installed.)
Preparing to unpack .../python2.7_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7 (2.7.9-2+deb8u1) over (2.7.3-6) ...
Preparing to unpack .../python2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7-minimal (2.7.9-2+deb8u1) over (2.7.3-6) ...
dpkg: warning: unable to delete old directory '/etc/python2.7': Directory not empty
Selecting previously unselected package libpython2.7-minimal:armhf.
Preparing to unpack .../libpython2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.9-2+deb8u1) ...
Selecting previously unselected package libffi6:armhf.
...

Preparing to unpack .../winbind_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
[ ok ] Stopping the Winbind daemon: winbind.
Unpacking winbind (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Selecting previously unselected package samba-libs:armhf.
...

Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Selecting previously unselected package libsmbclient:armhf.
Preparing to unpack .../libsmbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking libsmbclient:armhf (2:4.2.14+dfsg-0+deb8u9) ...
Preparing to unpack .../smbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking smbclient (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Preparing to unpack .../samba-common_2%3a4.2.14+dfsg-0+deb8u9_all.deb ...
Unpacking samba-common (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
dpkg: warning: unable to delete old directory '/etc/dhcp3/dhclient-enter-hooks.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/dhcp3': Directory not empty
Preparing to unpack .../cifs-utils_2%3a6.4-1_armhf.deb ...
Unpacking cifs-utils (2:6.4-1) over (2:5.5-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Impact



Many utilities now abort abnormally. E.g. mount aborts with message Killed!



WDMyCloud:/nfs/Public# mount.cifs '\192.168.1.7WD_3TB' /mnt/SEAGATE8TB/WD_3TB cifs -o user=username,workgroup=WORKGROUP,password=pwd

Killed

WDMyCloud:/nfs/Public# smbtree
smbtree: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned



The NAS DLNA server got corrupted too. Luckily I have a full backup of the entire NAS data (not system). However, I would like to avoid having to factory reset the device and redo all the configs...



Attempts to Fix it



apt-get -f install did not fix it.



WDMyCloud-Issam:~# apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
bind9 bind9utils ctdb ldb-tools ntp smbldap-tools
The following NEW packages will be installed:
samba
0 upgraded, 1 newly installed, 0 to remove and 270 not upgraded.
53 not fully installed or removed.
Need to get 0 B/958 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
(Reading database ... 26719 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


WDMyCloud-Issam:~# apt-cache policy cifs-utils
cifs-utils:
Installed: 2:6.4-1
Candidate: 2:6.4-1
Version table:
*** 2:6.4-1 0
500 http://ftp.us.debian.org/debian/ jessie/main armhf Packages
100 /var/lib/dpkg/status
WDMyCloud:~# modprobe cifs


Maybe smth to do with winbind?



WDMyCloud:~# sudo apt-get install cifs-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
cifs-utils is already the newest version.
cifs-utils set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
winbind : Depends: samba (= 2:4.2.14+dfsg-0+deb8u9) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Also looked up the ask ubuntu thread "Trying to install cifs-utils - the attempt created dependency hell" but couldn't figure out a resolution from it.



Any idea how to proceed?










share|improve this question
















My Linux libraries seem to have suffered a severe corruption just after running (as root):



apt-get install cifs-utils



I need to correct the corruption or restore the original libraries.



Note: I should avoid re-installation of Linux as this is a NAS (WDMyCloud 3TB running Debian Jessie)



Linux WDMyCloud 3.2.26 #1 SMP Thu Jul 9 11:14:15 PDT 2015 wd-2.4-rel armv7l GNU/Linux



Output



Some lines truncated for brevity.



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libarchive13 libasn1-8-heimdal libbsd0 libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal
libhdb9-heimdal libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libnss-winbind libntdb1
libp11-kit0 libpam-winbind libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient
libtalloc2 libtasn1-6 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python python-crypto python-dnspython python-ldb python-minimal
python-ntdb python-samba python-talloc python-tdb python2.7 python2.7-minimal samba samba-common samba-common-bin samba-dsdb-modules
samba-libs smbclient tdb-tools update-inetd winbind
Suggested packages:
lrzip cups-common gnutls-bin python-doc python-tk python-crypto-dbg python-crypto-doc python2.7-doc binutils binfmt-support bind9
bind9utils ctdb ldb-tools ntp smbldap-tools heimdal-clients
Recommended packages:
samba-vfs-modules
The following NEW packages will be installed:
libarchive13 libasn1-8-heimdal libcups2 libffi6 libfile-copy-recursive-perl libgmp10 libgnutls-deb0-28 libhcrypto4-heimdal libhdb9-heimdal
libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libkrb5-26-heimdal libldb1 libnettle4 libntdb1 libpython-stdlib libpython2.7
libpython2.7-minimal libpython2.7-stdlib libroken18-heimdal libsmbclient libtasn1-6 libtevent0 libwind0-heimdal python-crypto
python-dnspython python-ldb python-ntdb python-samba python-talloc python-tdb samba samba-dsdb-modules samba-libs tdb-tools update-inetd
The following packages will be upgraded:
cifs-utils libbsd0 libnss-winbind libp11-kit0 libpam-winbind libtalloc2 libtdb1 libwbclient0 python python-minimal python2.7
python2.7-minimal samba-common samba-common-bin smbclient winbind
16 upgraded, 37 newly installed, 0 to remove and 270 not upgraded.
2 not fully installed or removed.
Need to get 16.8 MB of archives.
After this operation, 8412 kB disk space will be freed.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.us.debian.org/debian/ jessie/main python2.7 armhf 2.7.9-2+deb8u1 [252 kB]
Get:2 http://ftp.us.debian.org/debian/ jessie/main python2.7-minimal armhf 2.7.9-2+deb8u1 [1152 kB]
...

Get:53 http://ftp.us.debian.org/debian/ jessie/main cifs-utils armhf 2:6.4-1 [66.7 kB]
Fetched 16.8 MB in 10s (1601 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 25724 files and directories currently installed.)
Preparing to unpack .../python2.7_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7 (2.7.9-2+deb8u1) over (2.7.3-6) ...
Preparing to unpack .../python2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7-minimal (2.7.9-2+deb8u1) over (2.7.3-6) ...
dpkg: warning: unable to delete old directory '/etc/python2.7': Directory not empty
Selecting previously unselected package libpython2.7-minimal:armhf.
Preparing to unpack .../libpython2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.9-2+deb8u1) ...
Selecting previously unselected package libffi6:armhf.
...

Preparing to unpack .../winbind_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
[ ok ] Stopping the Winbind daemon: winbind.
Unpacking winbind (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Selecting previously unselected package samba-libs:armhf.
...

Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Selecting previously unselected package libsmbclient:armhf.
Preparing to unpack .../libsmbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking libsmbclient:armhf (2:4.2.14+dfsg-0+deb8u9) ...
Preparing to unpack .../smbclient_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking smbclient (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
Preparing to unpack .../samba-common_2%3a4.2.14+dfsg-0+deb8u9_all.deb ...
Unpacking samba-common (2:4.2.14+dfsg-0+deb8u9) over (2:3.6.6-6+deb7u1) ...
dpkg: warning: unable to delete old directory '/etc/dhcp3/dhclient-enter-hooks.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/dhcp3': Directory not empty
Preparing to unpack .../cifs-utils_2%3a6.4-1_armhf.deb ...
Unpacking cifs-utils (2:6.4-1) over (2:5.5-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Impact



Many utilities now abort abnormally. E.g. mount aborts with message Killed!



WDMyCloud:/nfs/Public# mount.cifs '\192.168.1.7WD_3TB' /mnt/SEAGATE8TB/WD_3TB cifs -o user=username,workgroup=WORKGROUP,password=pwd

Killed

WDMyCloud:/nfs/Public# smbtree
smbtree: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned



The NAS DLNA server got corrupted too. Luckily I have a full backup of the entire NAS data (not system). However, I would like to avoid having to factory reset the device and redo all the configs...



Attempts to Fix it



apt-get -f install did not fix it.



WDMyCloud-Issam:~# apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
bind9 bind9utils ctdb ldb-tools ntp smbldap-tools
The following NEW packages will be installed:
samba
0 upgraded, 1 newly installed, 0 to remove and 270 not upgraded.
53 not fully installed or removed.
Need to get 0 B/958 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
(Reading database ... 26719 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba (2:4.2.14+dfsg-0+deb8u9) ...
dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack):
trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723
Errors were encountered while processing:
/var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


WDMyCloud-Issam:~# apt-cache policy cifs-utils
cifs-utils:
Installed: 2:6.4-1
Candidate: 2:6.4-1
Version table:
*** 2:6.4-1 0
500 http://ftp.us.debian.org/debian/ jessie/main armhf Packages
100 /var/lib/dpkg/status
WDMyCloud:~# modprobe cifs


Maybe smth to do with winbind?



WDMyCloud:~# sudo apt-get install cifs-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
cifs-utils is already the newest version.
cifs-utils set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
winbind : Depends: samba (= 2:4.2.14+dfsg-0+deb8u9) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Also looked up the ask ubuntu thread "Trying to install cifs-utils - the attempt created dependency hell" but couldn't figure out a resolution from it.



Any idea how to proceed?







debian samba dependencies cifs shared-library






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 2 at 12:17









Jeff Schaller

44.3k1162143




44.3k1162143










asked Mar 2 at 3:19









Issam A.Issam A.

1




1












  • To me this stands out; looks to me like WD have rolled their own samba (wild guess) and packaged it under a different name? dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack): trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723 ....

    – tink
    Mar 2 at 5:31











  • Not sure. The installation prep log above states: **The following packages will be upgraded**: cifs-utils ... python2.7 python2.7-minimal samba-common samba-common-bin smbclient winbind . The first anomaly during the installation is related to one of these packages (python2.7-minimal). However, I don't see that any existing package files have been corrupted, except for winbind daemon which was stopped. WDMyCloud-~# service winbind status -> [FAIL] winbind is not running ... failed!. Shall I start winbind and see!?

    – Issam A.
    Mar 2 at 18:36












  • WDMyCloud:~# service winbind start -> [....] Starting the Winbind daemon: winbindchgrp: invalid group: 'winbindd_priv' n /etc/init.d/winbind: line 35: return: can only 'return' from a function or sourced script n /usr/sbin/winbindd: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned n failed!

    – Issam A.
    Mar 2 at 18:46


















  • To me this stands out; looks to me like WD have rolled their own samba (wild guess) and packaged it under a different name? dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack): trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723 ....

    – tink
    Mar 2 at 5:31











  • Not sure. The installation prep log above states: **The following packages will be upgraded**: cifs-utils ... python2.7 python2.7-minimal samba-common samba-common-bin smbclient winbind . The first anomaly during the installation is related to one of these packages (python2.7-minimal). However, I don't see that any existing package files have been corrupted, except for winbind daemon which was stopped. WDMyCloud-~# service winbind status -> [FAIL] winbind is not running ... failed!. Shall I start winbind and see!?

    – Issam A.
    Mar 2 at 18:36












  • WDMyCloud:~# service winbind start -> [....] Starting the Winbind daemon: winbindchgrp: invalid group: 'winbindd_priv' n /etc/init.d/winbind: line 35: return: can only 'return' from a function or sourced script n /usr/sbin/winbindd: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned n failed!

    – Issam A.
    Mar 2 at 18:46

















To me this stands out; looks to me like WD have rolled their own samba (wild guess) and packaged it under a different name? dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack): trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723 ....

– tink
Mar 2 at 5:31





To me this stands out; looks to me like WD have rolled their own samba (wild guess) and packaged it under a different name? dpkg: error processing archive /var/cache/apt/archives/samba_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb (--unpack): trying to overwrite '/etc/logrotate.d/samba', which is also in package wd-nas 02.50.00-2435723 ....

– tink
Mar 2 at 5:31













Not sure. The installation prep log above states: **The following packages will be upgraded**: cifs-utils ... python2.7 python2.7-minimal samba-common samba-common-bin smbclient winbind . The first anomaly during the installation is related to one of these packages (python2.7-minimal). However, I don't see that any existing package files have been corrupted, except for winbind daemon which was stopped. WDMyCloud-~# service winbind status -> [FAIL] winbind is not running ... failed!. Shall I start winbind and see!?

– Issam A.
Mar 2 at 18:36






Not sure. The installation prep log above states: **The following packages will be upgraded**: cifs-utils ... python2.7 python2.7-minimal samba-common samba-common-bin smbclient winbind . The first anomaly during the installation is related to one of these packages (python2.7-minimal). However, I don't see that any existing package files have been corrupted, except for winbind daemon which was stopped. WDMyCloud-~# service winbind status -> [FAIL] winbind is not running ... failed!. Shall I start winbind and see!?

– Issam A.
Mar 2 at 18:36














WDMyCloud:~# service winbind start -> [....] Starting the Winbind daemon: winbindchgrp: invalid group: 'winbindd_priv' n /etc/init.d/winbind: line 35: return: can only 'return' from a function or sourced script n /usr/sbin/winbindd: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned n failed!

– Issam A.
Mar 2 at 18:46






WDMyCloud:~# service winbind start -> [....] Starting the Winbind daemon: winbindchgrp: invalid group: 'winbindd_priv' n /etc/init.d/winbind: line 35: return: can only 'return' from a function or sourced script n /usr/sbin/winbindd: error while loading shared libraries: libntdb.so.1: ELF load command alignment not page-aligned n failed!

– Issam A.
Mar 2 at 18:46











0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503911%2fapt-get-install-cifs-utils-corrupted-system-libraries-caused-chaos%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503911%2fapt-get-install-cifs-utils-corrupted-system-libraries-caused-chaos%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay