Ubuntu 20.04.2:由于缺少 libsamba-util.so.0,安装 Samba 失败

Ubuntu 20.04.2:由于缺少 libsamba-util.so.0,安装 Samba 失败

我从 Ubuntu 18 LTS 升级到 Ubuntu 20.04.2。现在我尝试安装 Samba。但是,apt-get 命令 sudo apt-get --reinstall install samba 失败(见下文),我不知道如何解决这个问题。

为了确保系统不会处理旧系统的“残留”,我用 清理了它sudo apt-get remove --purge samba samba-*。但这没有帮助。

有人知道该如何进行吗?

这是安装的结果:

$ sudo apt-get --reinstall install samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ibverbs-providers libboost-iostreams1.71.0 libboost-thread1.71.0 libcephfs2 libibverbs1 librados2 librdmacm1 python3-dnspython python3-gpg python3-ldb
  python3-markdown python3-packaging python3-samba python3-tdb samba-common samba-common-bin samba-dsdb-modules samba-vfs-modules
Suggested packages:
  python-markdown-doc bind9 bind9utils ctdb ldb-tools ntp | chrony smbldap-tools winbind heimdal-clients
The following NEW packages will be installed:
  ibverbs-providers libboost-iostreams1.71.0 libboost-thread1.71.0 libcephfs2 libibverbs1 librados2 librdmacm1 python3-dnspython python3-gpg python3-ldb
  python3-markdown python3-packaging python3-samba python3-tdb samba samba-common samba-common-bin samba-dsdb-modules samba-vfs-modules
0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9,525 kB of archives.
After this operation, 65.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package python3-dnspython.
(Reading database ... 213146 files and directories currently installed.)
Preparing to unpack .../00-python3-dnspython_1.16.0-1build1_all.deb ...
Unpacking python3-dnspython (1.16.0-1build1) ...
Selecting previously unselected package python3-ldb.
Preparing to unpack .../01-python3-ldb_2%3a2.0.10-0ubuntu0.20.04.2_amd64.deb ...
Unpacking python3-ldb (2:2.0.10-0ubuntu0.20.04.2) ...
Selecting previously unselected package python3-tdb.
Preparing to unpack .../02-python3-tdb_1.4.2-3build1_amd64.deb ...
Unpacking python3-tdb (1.4.2-3build1) ...
Selecting previously unselected package python3-samba.
Preparing to unpack .../03-python3-samba_2%3a4.11.6+dfsg-0ubuntu1.6_amd64.deb ...
Unpacking python3-samba (2:4.11.6+dfsg-0ubuntu1.6) ...
Selecting previously unselected package samba-common.
Preparing to unpack .../04-samba-common_2%3a4.11.6+dfsg-0ubuntu1.6_all.deb ...
Unpacking samba-common (2:4.11.6+dfsg-0ubuntu1.6) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../05-samba-common-bin_2%3a4.11.6+dfsg-0ubuntu1.6_amd64.deb ...
Unpacking samba-common-bin (2:4.11.6+dfsg-0ubuntu1.6) ...
Selecting previously unselected package samba.
Preparing to unpack .../06-samba_2%3a4.11.6+dfsg-0ubuntu1.6_amd64.deb ...
Unpacking samba (2:4.11.6+dfsg-0ubuntu1.6) ...
Selecting previously unselected package libibverbs1:amd64.
Preparing to unpack .../07-libibverbs1_28.0-1ubuntu1_amd64.deb ...
Unpacking libibverbs1:amd64 (28.0-1ubuntu1) ...
Selecting previously unselected package ibverbs-providers:amd64.
Preparing to unpack .../08-ibverbs-providers_28.0-1ubuntu1_amd64.deb ...
Unpacking ibverbs-providers:amd64 (28.0-1ubuntu1) ...
Selecting previously unselected package libboost-iostreams1.71.0:amd64.
Preparing to unpack .../09-libboost-iostreams1.71.0_1.71.0-6ubuntu6_amd64.deb ...
Unpacking libboost-iostreams1.71.0:amd64 (1.71.0-6ubuntu6) ...
Selecting previously unselected package libboost-thread1.71.0:amd64.
Preparing to unpack .../10-libboost-thread1.71.0_1.71.0-6ubuntu6_amd64.deb ...
Unpacking libboost-thread1.71.0:amd64 (1.71.0-6ubuntu6) ...
Selecting previously unselected package librdmacm1:amd64.
Preparing to unpack .../11-librdmacm1_28.0-1ubuntu1_amd64.deb ...
Unpacking librdmacm1:amd64 (28.0-1ubuntu1) ...
Selecting previously unselected package librados2.
Preparing to unpack .../12-librados2_15.2.7-0ubuntu0.20.04.2_amd64.deb ...
Unpacking librados2 (15.2.7-0ubuntu0.20.04.2) ...
Selecting previously unselected package libcephfs2.
Preparing to unpack .../13-libcephfs2_15.2.7-0ubuntu0.20.04.2_amd64.deb ...
Unpacking libcephfs2 (15.2.7-0ubuntu0.20.04.2) ...
Selecting previously unselected package python3-gpg.
Preparing to unpack .../14-python3-gpg_1.13.1-7ubuntu2_amd64.deb ...
Unpacking python3-gpg (1.13.1-7ubuntu2) ...
Selecting previously unselected package python3-packaging.
Preparing to unpack .../15-python3-packaging_20.3-1_all.deb ...
Unpacking python3-packaging (20.3-1) ...
Selecting previously unselected package python3-markdown.
Preparing to unpack .../16-python3-markdown_3.1.1-3_all.deb ...
Unpacking python3-markdown (3.1.1-3) ...
Selecting previously unselected package samba-dsdb-modules:amd64.
Preparing to unpack .../17-samba-dsdb-modules_2%3a4.11.6+dfsg-0ubuntu1.6_amd64.deb ...
Unpacking samba-dsdb-modules:amd64 (2:4.11.6+dfsg-0ubuntu1.6) ...
Selecting previously unselected package samba-vfs-modules:amd64.
Preparing to unpack .../18-samba-vfs-modules_2%3a4.11.6+dfsg-0ubuntu1.6_amd64.deb ...
Unpacking samba-vfs-modules:amd64 (2:4.11.6+dfsg-0ubuntu1.6) ...
Setting up libibverbs1:amd64 (28.0-1ubuntu1) ...
Setting up ibverbs-providers:amd64 (28.0-1ubuntu1) ...
Setting up samba-vfs-modules:amd64 (2:4.11.6+dfsg-0ubuntu1.6) ...
Setting up samba-common (2:4.11.6+dfsg-0ubuntu1.6) ...

Creating config file /etc/samba/smb.conf with new version
Setting up libboost-iostreams1.71.0:amd64 (1.71.0-6ubuntu6) ...
Setting up python3-tdb (1.4.2-3build1) ...
Setting up python3-packaging (20.3-1) ...
Setting up python3-gpg (1.13.1-7ubuntu2) ...
Setting up python3-ldb (2:2.0.10-0ubuntu0.20.04.2) ...
Setting up python3-markdown (3.1.1-3) ...
Setting up python3-dnspython (1.16.0-1build1) ...
Setting up libboost-thread1.71.0:amd64 (1.71.0-6ubuntu6) ...
Setting up samba-dsdb-modules:amd64 (2:4.11.6+dfsg-0ubuntu1.6) ...
Setting up python3-samba (2:4.11.6+dfsg-0ubuntu1.6) ...
Setting up librdmacm1:amd64 (28.0-1ubuntu1) ...
Setting up librados2 (15.2.7-0ubuntu0.20.04.2) ...
Setting up libcephfs2 (15.2.7-0ubuntu0.20.04.2) ...
Setting up samba-common-bin (2:4.11.6+dfsg-0ubuntu1.6) ...
Checking smb.conf with testparm
testparm: error while loading shared libraries: libsamba-util.so.0: cannot open shared object file: No such file or directory
dpkg: error processing package samba-common-bin (--configure):
 installed samba-common-bin package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of samba:
 samba depends on samba-common-bin (= 2:4.11.6+dfsg-0ubuntu1.6); however:
  Package samba-common-bin is not configured yet.

dpkg: error processing package samba (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for ufw (0.36-6) ...
WARN: Duplicate profile 'Dovecot IMAP', using last found
WARN: Duplicate profile 'Dovecot Secure IMAP', using last found
WARN: Duplicate profile 'Dovecot POP3', using last found
WARN: Duplicate profile 'Dovecot Secure POP3', using last found
Processing triggers for systemd (245.4-4ubuntu3.4) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
 samba-common-bin
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

它位于下面的包中,版本号为 20.04,显示在我的系统上。

root@zeus-H370M:~# apt-file search libsamba-util.so.0
libwbclient0: /usr/lib/x86_64-linux-gnu/libsamba-util.so.0
libwbclient0: /usr/lib/x86_64-linux-gnu/libsamba-util.so.0.0.1
root@zeus-H370M:~# apt-cache policy libwbclient0
libwbclient0:
  Installed: 2:4.11.6+dfsg-0ubuntu1.6
  Candidate: 2:4.11.6+dfsg-0ubuntu1.6
  Version table:
 *** 2:4.11.6+dfsg-0ubuntu1.6 500
        500 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
 2:4.11.6+dfsg-0ubuntu1 500
        500 http://ca.archive.ubuntu.com/ubuntu   focal/main amd64 Packages
root@zeus-H370M:~# cat /etc/os-release | grep PRETTY
PRETTY_NAME="Ubuntu 20.04.2 LTS"

apt-file 是一个很棒的小实用程序,它就是为此目的而创建的,用于查找包含所需文件的包,您还可以搜索文件的完整路径,而不仅仅是名称。

相关内容