From 5b187d04f59bf4f134631098bbd016fc9c0e103c Mon Sep 17 00:00:00 2001 From: Dan Gibbs Date: Sun, 21 May 2023 13:54:14 +0100 Subject: [PATCH] Post for building Ruby 2.7 with OpenSSL 1.1 --- .../0007-building-ruby-old-openssl-arch.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 content/blog/0007-building-ruby-old-openssl-arch.md diff --git a/content/blog/0007-building-ruby-old-openssl-arch.md b/content/blog/0007-building-ruby-old-openssl-arch.md new file mode 100644 index 0000000..f7bd4d1 --- /dev/null +++ b/content/blog/0007-building-ruby-old-openssl-arch.md @@ -0,0 +1,50 @@ +--- +title: Building Ruby Against OpenSSL 1.1 on Arch Linux +description: >- + How to build Ruby 2.4 on Arch Linux with RVM. +summary: >- + Example of building Ruby >= 2.4.x against OpenSSL 1.1 in Arch Linux with + RVM. +anchor: Building Ruby with OpenSSL 1.1 in Arch Linux +uri: building-ruby-old-openssl-arch +heading: Build Ruby with OpenSSL 1.1 in Arch via RVM +image: + src: images/blog/systemd-arch-docker.png + caption: ruby arch +tags: + - ruby + - arch linux + - rvm +date: "2023-05-21" +jsonld: + headline: "How to build older Ruby versions in Arch Linux" + datePublished: "2023-05-21" + dateCreated: "2023-05-21" + dateModified: "2023-05-21" +--- + +Example for compiling Ruby versions dependent on OpenSSL 1.1 via +[RVM][rvm]. + +Ruby 2.4.x - 2.7.x require OpenSSL 1.1 which has been superseded +on most operating systems. + + +## Ruby >= 2.4.x (OpenSSL 1.1) + +Install the OpenSSL 1.1 dependency: + +```bash +pacman -Sy openssl-1.1 +``` + +Build with RVM: + +```bash +CFLAGS+=" -I/usr/include/openssl-1.1" \ +LDFLAGS+=" -L/usr/lib/openssl-1.1 -lssl" \ +PKG_CONFIG_PATH=/usr/lib/openssl-1.1/pkgconfig \ +rvm install 2.7.7 +``` + +[rvm]: "Ruby Version Manager (RVM)"