Unable to locate package openssl-dev
Asked Answered
R

4

10

I'm trying to install the ROOT CERN packages on linux, using Ubuntu 18.04, and whenever I get into the prerequisites download, with this command:

sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev python openssl-dev

I get the following output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openssl-dev

I've tried correcting this by configurating my repository as was suggested in this thread, yet the problem still persisted.

Would like to know how is it possible to fix this. Thank you.

Edit:

The complete output of the sudo apt update command is:

Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done                     
Building dependency tree       
Reading state information... Done
All packages are up to date.

I've also tried installing the libssl-dev package with sudo apt install libssl1.0-dev and the outcome remains unchanged.

Reuter answered 22/11, 2020 at 3:13 Comment(0)
J
25

openssl-dev is for RedHat and CentOS systems.
Install openssl and libssl-dev instead, which works on Ubuntu and Debian.

sudo apt-get install openssl libssl-dev
Johst answered 1/2, 2021 at 10:16 Comment(2)
I am sorry, but for Fedora derivates (such as RHEL and CentOS), the package is called openssl-devel, not openssl-dev. Shortening -devel to -dev in package names is typically for Debian (and derivates).Concomitant
Is it necessary to install the openssl package as well as libssl-dev? Assuming just a development use case.Regrate
P
1

Type: sudo apt install libssl-dev without the version number, that worked for me. I am using Ubuntu 20.04.1 LTS.

Photoflash answered 14/1, 2021 at 11:40 Comment(2)
Actually, if you are using root.cern/install/dependencies/…, follow the instructions for Debian.Photoflash
The easiest way to install root on Ubuntu is with snap: snapcraft.io/install/root-framework/ubuntuPhotoflash
D
1

May you can install it by using def command (if it's available!)

eg.: sudo dnf install openssl-devel

Disaccustom answered 14/2, 2022 at 14:3 Comment(0)
E
0

I dont know much about different distro availability but i fixed the issue for Ubuntu 22.04 by using

sudo apt-get install openssl

instead of

sudo apt-get install libcurl4-OpenSSL-dev

command line result

Experiential answered 13/7 at 17:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.