我最近买了一台装有 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,curl
他使用相同版本的curl
(7.74.0-1.3ubuntu2) 和libldap
(2.5.6+dfsg-1~exp1ubuntu1) 运行正常。
我还尝试安装旧版本的 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 安装和“强制”升级,但令人惊讶的是,除此之外的一切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
。
答案1
输出分析ldd /usr/bin/curl
显示 Dell 软件包导致了此问题。要修复系统,我们需要通过以下方式删除它们:
sudo apt-get purge --autoremove dca-enabler-packages dca-enabler
注意:ldd 输出分析工具在此问答。它对我以编程方式检测您的问题有很大帮助。
答案2
我找到了另一个简单的解决方案,使用 snap 版本的 curl sudo snap install curl
,我刚刚在我的戴尔电脑上遇到了这个问题,snap 版本对我来说很好用