Unable to locate package python-openssl
Asked Answered
F

5

27

I'm trying to install Pyenv, and I'm running on Ubuntu 22.04 LTS. but whenever I run this command

sudo apt install -y make build-essential libssl-dev zlib1g-dev \ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl \ git

I get this error

Unable to locate package python-openssl

I've tried searching for solutions online, but I think they have encountered it on older versions of Ubuntu and not on the latest version.

Familiar answered 1/9, 2022 at 8:40 Comment(0)
L
52

Make sure your list of packages is updated (sudo apt update). Python openssl bindings are available in 22.04 in python3-openssl (link), so you can install it by running

sudo apt install python3-openssl
Larhondalari answered 1/9, 2022 at 8:56 Comment(0)
S
7

you must be using python3 so change python-openssl to python3-openssl in command

Sylvanite answered 31/1, 2023 at 9:7 Comment(1)
Yep that was it. notice the command "python-openssl" it should be "python3-openssl"Heathenism
S
2
sudo apt install openssl libssl-dev
Sophrosyne answered 1/9, 2022 at 8:45 Comment(2)
Thanks, but I've already executed that command but still have the same error.Familiar
@Familiar Remove python-openssl and replace the with his answer. It works.Thackeray
L
2

Had the same issue, changing from python to python3, as suggested here, worked for me.

Latham answered 24/5, 2023 at 0:53 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewCaesarism
S
2

Try this:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl

I just added a 3 after the python in python-openssl.

Spry answered 20/4, 2024 at 12:12 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.