繁体   English   中英

Ubuntu 21.10 上的 libssl1.1 依赖冲突

[英]libssl1.1 dependency conflict on Ubuntu 21.10

我是 ubuntu 的新手,我正在尝试安装 nodejs npm 但我收到错误消息:

以下软件包具有未满足的依赖关系: libssl-dev:依赖:libssl1.1 (= 1.1.1l-1ubuntu1) 但要安装 1.1.1l-1ubuntu1.1 E:无法纠正问题,您持有损坏的软件包。

我试图通过 apt 安装 libssl1.1 但我做错了什么。 请建议我一个正确的代码来安装我需要的正确版本的 libssl,我在 Ubuntu 21.10 上。

试试这些说明。 还有可能 libssl1.1 没有安装在您的系统上,因为您已经安装了其他 ssl 库并且存在冲突。 例如,如果它们是从 PPA 安装的。

我还没有深入挖掘到缺少 libssl1.1 库的原因,但似乎 LTS 22.04 暂时不包括它。

我为我的系统编写了以下脚本来安装它,因为我用来设置系统的工具之一需要它。

希望其他人觉得这很有用。

# Find the most recent 1.1 libssl package in the ubuntu archives
BASE_URL='http://archive.ubuntu.com/ubuntu/pool/main/o/openssl'
FILE="$( # The get parameters in the URL sort the results by descending chronological order
    curl -s "${BASE_URL}/?C=M;O=D" $(\
        # Make sure all tags are on separate lines - makes grep-work later easier \
        ) | tr '>' '>\n' $(\
        # extract all the unique links on the page \
        ) | grep 'href' | sed 's/^.*href="\([^"]*\)".*$/\1/p' | awk '!a[$0]++' $(\
        # pick the most relevant items on the list (libssl 1.1 for amd64 arch) \
        ) | grep "libssl" | grep "1.1_" | grep "amd64.deb" $(\
        # choose only the last one \
        ) | tail -1 )"
# Grab the file and if download was successful, install it with sudo
wget "${URL_BASE}/${FILE}" && sudo dpkg -i "./${FILE}"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM