我的 Linux 库在运行(以 root 身份)后似乎遭受了严重损坏:
apt-get install cifs-utils
我需要纠正损坏或恢复原始库。
注意:我应该避免重新安装 Linux,因为这是一个 NAS(运行 Debian Jessie 的 WDMyCloud 3TB)
Linux WDMyCloud 3.2.26 #1 SMP Thu Jul 9 11:14:15 PDT 2015 wd-2.4-rel armv7l GNU/Linux
输出
为简洁起见,某些行被截断。
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)
影响
许多实用程序现在异常中止。例如,mount
中止并显示消息Killed
!
WDMyCloud:/nfs/Public# mount.cifs '\\192.168.1.7\WD_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
NAS DLNA 服务器也损坏了。幸运的是我有整个 NAS 数据(不是系统)的完整备份。但是,我想避免必须将设备重置为出厂设置并重做所有配置......
尝试修复它
apt-get -f install
没有修复它。
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
也许与 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).
还查阅了 ask ubuntu 帖子“尝试安装 cifs-utils - 尝试创建了依赖地狱“但无法从中找出解决方案。
知道如何继续吗?