Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirements_debian_libs_install libssl1.0-dev 2.3.8 on Ubuntu 19.04 #4680

Open
otavioschwanck opened this issue Apr 25, 2019 · 33 comments
Open

Comments

@otavioschwanck
Copy link

otavioschwanck commented Apr 25, 2019

Warning, new version of rvm available '1.29.7', you are using older version '1.29.7-next'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/19.04/x86_64/ruby-2.3.8.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system - please wait
Installing required packages: libssl1.0-dev - please wait
Error running 'requirements_debian_libs_install libssl1.0-dev',
please read /home/otavio/.rvm/log/1556163658_ruby-2.3.8/package_install_libssl1.0-dev.log
Requirements installation failed with status: 100.

EDIT:

Managed to installling libssl1.0-dev

@grhansen
Copy link

grhansen commented Apr 26, 2019

@otavioschwanck - i'm getting the same error. doesn't look like libssl1.0-dev is included in the repositories for 19.04. I wound up adding in the security repository for cosmic based on the recommendation here => https://packages.ubuntu.com/cosmic/amd64/libssl1.0.0/download and was able to install my ruby-2.3.X.

@pkuczynski
Copy link
Member

I can update deps if you tell me how to install old version of that deop on a newer ubuntu?

@bfg
Copy link

bfg commented Apr 29, 2019

I believe it's libssl-dev:

$ dpkg -l | grep -i libssl
ii  libssl-dev:amd64      1.1.1b-1ubuntu2      amd64        Secure Sockets Layer toolkit - development files

@pkuczynski
Copy link
Member

This would be implementing openssl > 1.0, and old versions of ruby need the 1.0

@bfg
Copy link

bfg commented Apr 29, 2019

Oh, right, i was not aware of that. As far as i can see there is currently no 1.0.x openssl package available in ubuntu 19.04 repositories :-/ i'll take a look whether there's a PPA with backport. Is there a possibility to disable this action where rvm automatically uninstalls libssl-dev and maybe respects CFLAGS LDFLAGS, so that i can compile openssl 1.0.x on my own and install it to non-standard location?

@choallin
Copy link

@grhansen I installed libssl that you linked to, but I am still getting the same error. Did you do something else to be able to install an old Ruby?

@grhansen
Copy link

grhansen commented May 1, 2019

@choallin - after I added the repository to my sources, I reloaded with sudo apt update and then verified that the library was available using apt-cache policy... Here are my results after I've installed it:

apt-cache policy libssl1.0-dev
libssl1.0-dev:
  Installed: 1.0.2n-1ubuntu6.2
  Candidate: 1.0.2n-1ubuntu6.2
  Version table:
 *** 1.0.2n-1ubuntu6.2 500
        500 http://security.ubuntu.com/ubuntu cosmic-security/main amd64 Packages
        100 /var/lib/dpkg/status

@sidneip
Copy link

sidneip commented May 15, 2019

rvm install 2.2.0 --autolibs=disable solved to me

@samhanes-fs
Copy link

Note that --autolibs=disable will cause the install to succeed, but Ruby will be built without OpenSSL support, which may cause issues later depending on what you're doing.

@bfg
Copy link

bfg commented Jun 6, 2019

@samhanes-fs indeed, that was the case for me as well; i had to move away from rvm to docker-based development using official ruby docker images.

@Basit-Mahmood
Copy link

I did the same as @grhansen suggested. I was installing ruby 2.3 and that required libssl1.0-dev. I am using Ubuntu 19.04. So I opened my /etc/apt/sources.list by sudo nano /etc/apt/sources.list. And then add the following line at the end of the file deb http://security.ubuntu.com/ubuntu bionic-security main . After that I run the command sudo apt update from the terminal. Then I run the command apt-cache policy libssl1.0-dev from the terminal and I got the following output
libssl1.0-dev: Installed: (none) Candidate: 1.0.2n-1ubuntu5.3 Version table: 1.0.2n-1ubuntu5.3 500 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
Then I run the command sudo apt-get install libssl1.0-dev. And it is installed then

Before adding I was getting
libssl1.0-dev: Installed: (none) Candidate: (none) Version table:

@vijithvellora
Copy link

  1. sudo nano /etc/apt/sources.list
  2. add deb http://security.ubuntu.com/ubuntu bionic-security main
  3. sudo apt update && apt-cache policy libssl1.0-dev
  4. sudo apt-get install libssl1.0-dev

@rob-mcgrail
Copy link

Later versions of Ubuntu have no libssl1.0-dev package...

I fixed this for most of my Ubuntu 19.10 situations via:

rvm pkg install openssl

and

rvm install 2.3.1 --with-openssl-dir=$HOME/.rvm/usr --autolibs=disable

Although I'm now hitting issues where the mysql2 gem is broken (postgres projects work fine).

@nour-nabil-trianglz
Copy link

Later versions of Ubuntu have no libssl1.0-dev package...

I fixed this for most of my Ubuntu 19.10 situations via:

rvm pkg install openssl

and

rvm install 2.3.1 --with-openssl-dir=$HOME/.rvm/usr --autolibs=disable

Although I'm now hitting issues where the mysql2 gem is broken (postgres projects work fine).

I am hitting the same issues as you do currently,i am looking into this issue as well but hitting a dead end,if you reach any progress please notify me with what to do if you can ?

@DiegoRenan
Copy link

I was getting the same error on Ubuntu 18.04.
sudo apt-get update worked for me.

@llarruda
Copy link

llarruda commented Apr 16, 2020

I have the same issue in Debian Stretch for Ruby 2.0.0:
Log:
[2020-04-16 11:15:53] requirements_debian_libs_install
E: Package 'libssl1.0-dev' has no installation candidate

For who has not find repositories, maybe this have some utility, since when I use Ubuntu package .deb and your dependencies worked fine.

As I am in a Debian host I look for packages 'libssl1.0-dev' at:
https://packages.debian.org/
And I see that has this dependency, as it is usual for dev packages:
libssl1.0.2_1.0.2u-1

On Ubuntu it needs to look for some official Repository or PPA to install it or try install . deb packages if was not found.

As a comment above said, just the ruby being installed doesn't means that you will not face another problems, in the end is the SSL lib and everything you build with minimal critical security will be broken.

@frei-x
Copy link

frei-x commented May 13, 2020

mark

@CarlosRoque
Copy link

1. sudo nano /etc/apt/sources.list

2. add deb http://security.ubuntu.com/ubuntu bionic-security main

3. sudo apt update && apt-cache policy libssl1.0-dev

4. sudo apt-get install libssl1.0-dev

this worked great on ubuntu 20.04

@frei-x
Copy link

frei-x commented Jul 17, 2020

1. sudo nano /etc/apt/sources.list

2. add deb http://security.ubuntu.com/ubuntu bionic-security main

3. sudo apt update && apt-cache policy libssl1.0-dev

4. sudo apt-get install libssl1.0-dev

this worked great on ubuntu 20.04

Thank you, the problem has been solved

@raelgc
Copy link
Contributor

raelgc commented Jul 17, 2020

I just built libssl1.0-dev on the dedicated Ubuntu package PPA. So, anyone using that package will have automatically this library available to install on 20.04.

@Kulgar
Copy link

Kulgar commented Aug 20, 2020

Hi, adding some inputs on this issue:

The problem is that rvm always wants to install libssl1.0-dev on Ubuntu for old rubies (<= 2.3), but there is a conflict with the mysql2 gem (and other libs that may use libssl-dev on Ubuntu 18+).

That one needs libmysqlclient-dev installed, which requires libssl-dev to run. When you do the installation, it removes automatically the libssl1.0-dev package.

According to this thread: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1861304 - regarding mysql, it seems that libssl1.0-dev is an older version of libssl than the one shipped in the libssl-dev package.

Indeed, you can see here: https://packages.ubuntu.com/fr/bionic/libmysqlclient-dev that libssl-dev is at version 1.1 (and requiring libssl-1.1), but libssl1.0-dev: https://packages.ubuntu.com/fr/bionic/libdevel/libssl1.0-dev is requiring libssl-1.0.

So, rvm should rather install libssl-dev as this lib is more recent (and still maintained) rather than installing libssl1.0-dev which is removed in recent Ubuntu versions.

[EDIT] Actually - it seems that rvm is requiring libssl1.0-dev or libssl-dev depending on the ruby version to install:

requirements_ubuntu_define_libssl()

This is a bit troublesome as by removing libssl-dev, it removes all its dependencies (like libmysqlclient-dev)... so, best solution is to update the ruby version used in projects to use latest libssl-dev version ^^'...

I have no problems installing old ruby versions, and then re-installing libmysqlclient-dev with libssl-dev (which removes libssl1.0-dev). Everything is running fine... So I guess, libssl1.0-dev is only required to build old ruby versions but not to run them?

Anyway, this requirement part should be updated for Ubuntu 19+ where libssl1.0-dev no longer exists by default. But I don't know what we should do... add the ppa? Warn people that old rubies can't be installed by rvm on Ubuntu 19+?
Are we sure that ruby <= 2.3 won't build with libssl1.1 (and libssl-dev)?

@raelgc
Copy link
Contributor

raelgc commented Aug 20, 2020

@Kulgar Like you said, old rubies wants the old libssl to be compiled. About Ubuntu 19: as is no more supported (end of life was July, 17th), Launchpad blocks me to publish new files (the old libssl) for it. Your options are to use the 20.04 PPA (and I'm not sure how this will behave) or jump to any LTS version.

@Kulgar
Copy link

Kulgar commented Aug 20, 2020

@raelgc : there is also a pb with other libs that would require libssl-dev on Ubuntu 18- (like libmysqlclient)... Wouldn"t it be possible to package libssl1.0-dev with rvm to install old ruby versions instead of installing that lib system-wide? Maybe that's too complicated... But, clearly, forcing the installation of libssl1.0-dev (system-wide) is already causing pbs with other libs that require libssl-dev...

And... I can't think of any good way to solve that pb...

@tjgfernandes
Copy link

for Debian "buster", run steps as root:

  1. add 'deb http://ftp.de.debian.org/debian stretch main ' into /etc/apt/sources.list
  2. apt-get update
  3. apt-get install libssl1.0-dev

@techno199
Copy link

  1. sudo nano /etc/apt/sources.list
  2. add deb http://security.ubuntu.com/ubuntu bionic-security main
  3. sudo apt update && apt-cache policy libssl1.0-dev
  4. sudo apt-get install libssl1.0-dev

I absolutely love you

@jgomo3
Copy link

jgomo3 commented Apr 9, 2021

Later versions of Ubuntu have no libssl1.0-dev package...

I fixed this for most of my Ubuntu 19.10 situations via:

rvm pkg install openssl

and

rvm install 2.3.1 --with-openssl-dir=$HOME/.rvm/usr --autolibs=disable

Although I'm now hitting issues where the mysql2 gem is broken (postgres projects work fine).

Just confirming to you: This is indeed happening on Ubuntu 20.04

@raelgc
Copy link
Contributor

raelgc commented Apr 9, 2021

@jgomo3: If you're using the Ubuntu dedicated package, the related PPA has the old openssl library and it'll install automatically when required.

Just confirming to you: This is indeed happening on Ubuntu 20.04

@biahos
Copy link

biahos commented Mar 29, 2022

  1. sudo nano /etc/apt/sources.list

    1. add deb http://security.ubuntu.com/ubuntu bionic-security main

    2. sudo apt update && apt-cache policy libssl1.0-dev

    3. sudo apt-get install libssl1.0-dev

This didn't work for me, I'm still getting the same error "Error running 'requirements_debian_libs_install libncurses5-dev libssl-dev',
please read /home/biahos/.rvm/log/1648541604_ruby-3.0.0/package_install_libncurses5-dev_libssl-dev.log
Requirements installation failed with status: 100."

@bigos
Copy link

bigos commented Aug 11, 2022

Has this issue been resolved yet? It was a sad day of futile search for a solution.

@SeemabMehmood
Copy link

This is what works for me https://stackoverflow.com/a/60325120/19120958

@pkuczynski
Copy link
Member

@SeemabMehmood would you be keen on providing a PR?

@bigos
Copy link

bigos commented Jan 26, 2023

I did not work for me, sudo apt update gave me error.

W: GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
jacek@jacek-Lenovo-YOGA-3-Pro-1370:~$ sudo apt install libssl1.0-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libssl1.0-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libssl1.0-dev' has no installation candidate

@ZarakiLancelot
Copy link

Hi, has anyone been able to solve it with Ubuntu 22.04?

sudo apt-cache policy libssl1.0-dev
libssl1.0-dev:
  Instalados: (ninguno)
  Candidato:  (ninguno)
  Tabla de versión:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests