简体   繁体   English

Ubuntu 21.10 上的 libssl1.1 依赖冲突

[英]libssl1.1 dependency conflict on Ubuntu 21.10

I'm new to ubuntu and I'm trying to install nodejs npm but I get the error:我是 ubuntu 的新手,我正在尝试安装 nodejs npm 但我收到错误消息:

The following packages have unmet dependencies: libssl-dev: Depends: libssl1.1 (= 1.1.1l-1ubuntu1) but 1.1.1l-1ubuntu1.1 is to be installed E: Unable to correct problems, you have held broken packages.以下软件包具有未满足的依赖关系: libssl-dev:依赖:libssl1.1 (= 1.1.1l-1ubuntu1) 但要安装 1.1.1l-1ubuntu1.1 E:无法纠正问题,您持有损坏的软件包。

I tried to install libssl1.1 via apt but ig I'm doing something wrong.我试图通过 apt 安装 libssl1.1 但我做错了什么。 Please suggest me a right code to install the right version of libssl I need, I'm on Ubuntu 21.10.请建议我一个正确的代码来安装我需要的正确版本的 libssl,我在 Ubuntu 21.10 上。

Try these instructions.试试这些说明。 Also it's possible libssl1.1 isn't installing on your system because you have other ssl libraries already installed and are conflicting.还有可能 libssl1.1 没有安装在您的系统上,因为您已经安装了其他 ssl 库并且存在冲突。 If they were installed from PPAs for example.例如,如果它们是从 PPA 安装的。

I've not dug deep enough to find the reason behind the missing libssl1.1 library, but it seems the LTS 22.04 isn't including it for the time being.我还没有深入挖掘到缺少 libssl1.1 库的原因,但似乎 LTS 22.04 暂时不包括它。

I wrote the following script for my systems to have it installed, as one of the tools I use to setup the system requires it.我为我的系统编写了以下脚本来安装它,因为我用来设置系统的工具之一需要它。

Hope others find this useful.希望其他人觉得这很有用。

# 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