我最近买了一台带有 ubuntu 20.04 的 Dell Precision 3450,并分两步升级到 ubuntu 21.10(20.04 -> 21.04 -> 21.10)。这需要手动升级文件/usr/lib/os-release
,如此处所述,可能是因为戴尔对 OEM 安装进行了自定义。
无论如何,系统现在工作正常,只有一个例外。当我输入curl
终端(我在第二次升级后安装的)时,我收到以下错误消息。
curl:加载共享库时出错:libldap_r-2.4.so.2:无法打开共享对象文件:没有这样的文件或目录
所以似乎 curl 正在尝试在未安装的 2.4 版中加载 libldap。我问了一个朋友,他也有 ubuntu 21.10,并且在(7.74.0-1.3ubuntu2) 和(2.5.6+dfsg-1~exp1ubuntu1)curl
的相同版本下工作正常。curl
libldap
我还尝试安装旧版本的 libldap - 特别是libldap-2.4-2_2.4.57+dfsg-2ubuntu1_amd64.deb
来自 21.04 repo 的文件 - 但在这样做之后,curl
给了我一个新的错误消息:
curl:符号查找错误:curl:未定义符号:curl_multi_poll,版本 URL_OPENSSL_4
所以这没有帮助。
有人知道发生了什么吗?
我不明白动态链接是如何工作的,谷歌搜索并没有真正帮助。该网站建议简单地做sudo /sbin/ldconfig -v
,但没有奏效。
我不知道问题是否特定于 ubuntu 的 OEM 安装和“强制”ugprade,但令人惊讶的是,除此之外的一切curl
似乎都有效。
编辑:
这是在工作ldd $(type -p curl)
的系统上的输出curl
。
linux-vdso.so.1 (0x00007ffe043f1000)
libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fc870cbb000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc870c9f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc870a77000)
libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fc870a49000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fc870a28000)
librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fc870a09000)
libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x00007fc87099a000)
libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fc870986000)
libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fc8708ee000)
libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fc870613000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fc8705c1000)
libldap-2.5.so.0 => /lib/x86_64-linux-gnu/libldap-2.5.so.0 (0x00007fc870562000)
liblber-2.5.so.0 => /lib/x86_64-linux-gnu/liblber-2.5.so.0 (0x00007fc87054f000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fc870541000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc870db5000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fc8703bf000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fc8701da000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007fc870192000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007fc87014a000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fc8700c7000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fc86fffe000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fc86ffd1000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fc86ffcb000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fc86ffbb000)
libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fc86ffa0000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fc86ff7d000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fc86fe43000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fc86fe2d000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fc86fe24000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fc86fe0f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc86fe0a000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fc86fdfe000)
这是在不起作用ldd $(type -p curl)
的系统上的输出。curl
linux-vdso.so.1 (0x00007fffa0f86000)
libcurl.so.4 => /usr/lib/dcaenabler/libcurl.so.4 (0x00007fc1b789f000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc1b7883000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc1b765b000)
libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fc1b762d000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fc1b760c000)
librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fc1b75ed000)
libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fc1b75d7000)
libssl.so.1.1 => /usr/lib/dcaenabler/libssl.so.1.1 (0x00007fc1b734a000)
libcrypto.so.1.1 => /usr/lib/dcaenabler/libcrypto.so.1.1 (0x00007fc1b6e7f000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fc1b6e2d000)
libldap_r-2.4.so.2 => not found
liblber-2.4.so.2 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc1b6e26000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc1b7b74000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fc1b6ca4000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fc1b6abf000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007fc1b6a77000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007fc1b6a31000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fc1b69ac000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc1b69a7000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fc1b68de000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fc1b68b1000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fc1b68ab000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fc1b689d000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fc1b6761000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fc1b674b000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fc1b6744000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fc1b672f000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fc1b6723000)
which curl
有问题系统的输出:
/usr/bin/curl
aptitude search ~o
有问题系统的输出:
i dca-enabler - Provides the DELL Client Agent Enabler software.
i dca-enabler-packages - Provides the DELL Client Agent Enabler Dependencies.
i dell-canonical-logo - Install the dell-canonical-logo in gnome-control-center.
i dell-super-key - Disables the super key by default.
i djvu2pdf - Script to convert Djvu files to PDF files
i fist - Factory Install System Test
i A gir1.2-unity-5.0 - GObject introspection data for the Unity library
i A linux-headers-5.10.0-1031-oem - Linux kernel headers for version 5.10.0 on 64 bit x86 SMP
i A linux-headers-5.10.0-1050-oem - Linux kernel headers for version 5.10.0 on 64 bit x86 SMP
i A linux-headers-oem-20.04b - OEM Linux kernel headers
i A linux-image-5.10.0-1031-oem - Signed kernel image oem
i A linux-image-5.10.0-1050-oem - Signed kernel image oem
i A linux-image-oem-20.04b - OEM Linux kernel image
i A linux-modules-5.10.0-1031-oem - Linux kernel extra modules for version 5.10.0 on 64 bit x86 SMP
i A linux-modules-5.10.0-1050-oem - Linux kernel extra modules for version 5.10.0 on 64 bit x86 SMP
i linux-oem-20.04b - Complete OEM Linux kernel and headers
i A linux-oem-5.10-headers-5.10.0-1031 - Header files related to Linux kernel version 5.10.0
i A linux-oem-5.10-headers-5.10.0-1050 - Header files related to Linux kernel version 5.10.0
i A linux-oem-5.10-tools-5.10.0-1031 - Linux kernel version specific tools for version 5.10.0-1031
i linux-tools-5.10.0-1031-oem - Linux kernel version specific tools for version 5.10.0-1031
i lsd - An ls command with a lot of pretty colors.
i manage-distro-upgrade - Disable upgrade for OEM.
i A manage-estar-settings - Energy Star related settings
i A oem-fix-misc-cnl-tlp-estar-conf - customized configuration for tlp.
i oem-ouagadougou-meta - Meta package for the OEM mainstreams image.
i oem-release - Show oem release version
i oem-somerville-butterfree-meta - hardware support for Somerville Butterfree platform
i oem-somerville-factory-butterfree-meta - hardware support for Somerville Butterfree platform (factory)
i oem-somerville-factory-meta - hardware support for Somerville platform
i oem-somerville-meta - hardware support for Somerville platform
i A oem-somerville-partner-archive-keyring - Somerville project keyrings
i slack-desktop - Slack Desktop
i sosreport-oem - OEM image releated sosreport plugins and utilities.
aptitude search ~b
什么都不输出——没有损坏的包。
这是输出tree /usr/local/
:
/usr/local/
├── bin
├── etc
├── games
├── include
├── lib
│ └── python3.9
│ └── dist-packages
├── man -> share/man
├── sbin
├── share
│ ├── ca-certificates
│ ├── fonts
│ ├── man
│ ├── sgml
│ │ ├── declaration
│ │ ├── dtd
│ │ ├── entities
│ │ ├── misc
│ │ └── stylesheet
│ ├── texmf
│ └── xml
│ ├── declaration
│ ├── entities
│ ├── misc
│ └── schema
├── src
└── stow
输出dpkg -S /usr/lib/dcaenabler/libcurl.so.4 /usr/lib/dcaenabler/libssl.so.1.1 /usr/lib/dcaenabler/libcrypto.so.1.1
:
dca-enabler-packages: /usr/lib/dcaenabler/libcurl.so.4
dca-enabler-packages: /usr/lib/dcaenabler/libssl.so.1.1
dca-enabler-packages: /usr/lib/dcaenabler/libcrypto.so.1.1
最可能相关:我刚刚观察到表格的重复行
10 Nov 2021 15:36:59 j-dell env[10851] /usr/sbin/dcae: error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory
在/var/log/syslog
. 如果我dcae
在命令行上运行,我会收到错误消息
dcae: error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory
就像curl
.
输出分析
ldd /usr/bin/curl
表明,戴尔软件包会导致此问题。要修复系统,我们需要通过以下方式删除它们注意:本问答中讨论了用于 ldd 输出分析的工具。以编程方式检测您的问题对我有很大帮助。
我为这个问题找到了另一个简单的解决方案,使用 curl 的 snap 版本
sudo snap install curl
,我只是在我的戴尔电脑上遇到了这个问题,并且 snap 版本对我来说很好