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

Install libssl1.0-dev instead of libssl-dev with apt #287

Open
mvz opened this issue Dec 1, 2016 · 12 comments

Comments

Projects
None yet
@mvz
Copy link

commented Dec 1, 2016

On recent versions of Debian, libssl-dev installs dev files for libssl 1.1. CRuby fails to build with that, and needs libssl 1.0 instead.

Please consider installing libssl1.0-dev instead.

@havenwood havenwood added the apt label Jun 8, 2017

@Shelvak

This comment has been minimized.

Copy link

commented Jun 11, 2017

Same issue in archlinux.
I tried to install openssl-1.0 and lib32-openssl-1.0 to get the lib working, and put --with-openssl-dir but i didn't work.
I tried with env var and with the option param
RUBY_CONFIGURE_OPTS=--with-openssl-dir=path/openssl/ ruby-install ruby 2.1.9 -- --with-openssl-dir=path/openssl/
Always get the same error

/usr/include/openssl/asn1_mac.h:10:2: error: #error "This file is obsolete; please update your software."               
 #error "This file is obsolete; please update your software."
@guilhermefeitosa66

This comment has been minimized.

Copy link

commented Jun 25, 2017

Same issue in Elementary OS 0.4.1 Loki amd64.
INPUT: $ rvm install 2.3.3
OUTPUT:
Warning, new version of rvm available '1.29.2', you are using older version '1.29.1'.
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: debian/9/x86_64/ruby-2.3.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Installing requirements for debian.
Updating systemguilherme password required for 'apt-get --quiet --yes update': ..
..
Installing required packages: libssl1.0-dev....
Error running 'requirements_debian_libs_install libssl1.0-dev',
showing last 15 lines of /home/guilherme/.rvm/log/1498394767_ruby-2.3.3/package_install_libssl1.0-dev.log
++ [[ -d /usr/local/sbin ]]
++ [[ :/home/guilherme/.rvm/gems/ruby-2.4.0@rails-4.2/bin:/home/guilherme/.rvm/gems/ruby-2.4.0@global/bin:/home/guilherme/.rvm/rubies/ruby-2.4.0/bin:/home/guilherme/.dropbox-bin:/home/guilherme/bin:/home/guilherme/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/guilherme/.rvm/bin:/home/guilherme/.rvm/bin: != :/\u\s\r/\l\o\c\a\l/\s\b\i\n: ]]
++ [[ -n '' ]]
++ command_to_run=(__rvm_sudo -p "%p password required for '$*': " "${command_to_run[@]}")
++ __rvm_sudo -p '%p password required for '''apt-get --no-install-recommends --yes install libssl1.0-dev''': ' apt-get --no-install-recommends --yes install libssl1.0-dev
++ command sudo -p '%p password required for '''apt-get --no-install-recommends --yes install libssl1.0-dev''': ' apt-get --no-install-recommends --yes install libssl1.0-dev
++ sudo -p '%p password required for '''apt-get --no-install-recommends --yes install libssl1.0-dev''': ' apt-get --no-install-recommends --yes install libssl1.0-dev
Lendo listas de pacotes...
Construindo árvore de dependências...
Lendo informação de estado...
E: Impossível encontrar o pacote libssl1.0-dev
E: Couldn't find any package by glob 'libssl1.0-dev'
E: Não foi possível encontrar o pacote através da expressão regular 'libssl1.0-dev'
++ return 100
++ return 100
Requirements installation failed with status: 100.

@bugthing

This comment has been minimized.

Copy link

commented Jul 4, 2017

This is/was an issue for me using debian stretch (v9) .. I got around the issue by installing all dependencies manually (something like: apt install libyaml-dev libxml2-dev libssl1.0-dev libreadline-dev zlib1g zlib1g-dev libbison-dev libxslt1-dev libxml2-dev) before running the ruby install telling it to NOT install dependencies, like so ruby-install ruby --no-install-deps 2.3.4

@crivotz

This comment has been minimized.

Copy link

commented Oct 4, 2017

Problem seem related to the ruby version (2.1.x 2.2.x 2.3.x)
I saw that rvm if you install 2.1.2 version proceed to remove libssl-dev and install libssl1.0-dev

@go2null

This comment has been minimized.

@dgtized

This comment has been minimized.

Copy link

commented Jul 13, 2018

I found this issue after resolving it locally through patching the dependencies.txt in my local install:

--- /usr/local/share/ruby-install/ruby/dependencies.txt 2018-07-13 18:23:40.326935447 -0500
+++ dependencies.txt    2018-07-13 18:23:24.010431858 -0500
@@ -1,4 +1,4 @@
-apt: build-essential bison zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev
+apt: build-essential bison zlib1g-dev libyaml-dev libssl1.0-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev
 dnf: gcc automake bison zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel
 yum: gcc automake bison zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel
 port: automake bison openssl readline libyaml gdbm libffi

I presume that is limited to <=2.3.x ruby's, so it's not a good patch to apply in general, and the better fix would have been to use the above example of ruby-install ruby --no-install-deps 2.3.7.

@Shelvak

This comment has been minimized.

Copy link

commented Jul 14, 2018

If anyone needs a "quick fix" for any SO, installing openssl-1.0 from official repos or manually, then you can do: PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig ruby-install ruby 2.X.X

Obviously PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig with the correct path for openssl-1.0 pkgconfig.

Cheers.

@kolosek

This comment has been minimized.

Copy link

commented Sep 27, 2018

In order to fix rvm get master, you can use this command:
echo insecure >> ~/.curlrc
And then run the rvm get master. It worked for me 18.04.1 Ubuntu

@mvz

This comment has been minimized.

Copy link
Author

commented Sep 28, 2018

@kolosek that is a good tip for rvm users, but I don't see how this has anything to do with this ticket, which is about installing older versions of Ruby with ruby-install?

andresriancho added a commit to andresriancho/w3af that referenced this issue Dec 26, 2018

@jleo3

This comment has been minimized.

Copy link

commented May 23, 2019

@dgtized comment was a live-saver! Thank you!

@jonleighton

This comment has been minimized.

Copy link

commented Jun 17, 2019

I've had this problem trying to install Ruby 2.1.5 on Fedora 30, where openssl 1.0 is not available to install from the package manager at all. I was able to solve it by manually downloading and building openssl and then linking Ruby against this custom version. Here are the steps:

$ cd ~/src
$ wget https://www.openssl.org/source/openssl-1.0.2s.tar.gz
$ tar xvzf openssl-1.0.2s.tar.gz
$ cd openssl-1.0.2s
$ mkdir ~/.rubies/openssl-1.0.2s
$ ./config --prefix=$HOME/.rubies/openssl-1.0.2s --shared
$ make
$ make install
$ ruby-install ruby-2.1.5 -- --with-openssl-dir=$HOME/.rubies/openssl-1.0.2s
@jonleighton

This comment has been minimized.

Copy link

commented Jun 17, 2019

I also needed to link my custom-install OpenSSL config with my system OpenSSL config, as certification verification was failing with the default config:

rm -r ~/.rubies/openssl-1.0.2s/ssl
ln -s /etc/pki/tls ~/.rubies/openssl-1.0.2s/ssl

The /etc/pki/tls location may well be different on other distros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.