You are not logged in.

#1 2025-10-14 12:03:13

tadano_tensai
Member
Registered: 2025-10-14
Posts: 1

Cannot install ruby-2.6.2 on arch

i everyone,

I'm having trouble installing older Ruby versions (like 2.6.2 or 2.6.4) on my Arch Linux setup. Here’s what I’ve tried so far and the errors I encountered:

What I tried:

RVM:
Installed RVM and tried rvm install 2.6.2.
Got errors related to openssl and gcc when compiling.

Tried applying the openssl_3.patch with --with-openssl-dir=/usr/include/openssl-1.

I have tried mise, asdf, rbenv
like everything I could try. but with no success. I have even tried to compile it from source still encountered lots of errors.
I also tried asking every llm I could think of.

If there is someone who can help me, please do so

I can send you whatever logs you ask for...

just someone please, I'm so desperate

I have never asked a question in any forum in my life in the 5 years I have been using Linux(this has pushed me to my limits)

P.S don's recommend docker, It is running successfully on docker.

but I want to run the project locally

Offline

#2 Yesterday 11:49:46

lmn
Member
Registered: 2021-05-09
Posts: 86
Website

Re: Cannot install ruby-2.6.2 on arch

Without proper context this issue seems a little hard. Here are my findings:

I tried to compile the ruby versions from source.
When using a newer version of gcc (above v15.1) the external modules can not compile anymore.
This is documented in the bugtracker. You should have seen warnings like this:

.digest.c:796:57: error: passing argument .. from incompatible pointer type [-Wincompatible-pointer-types]

The problem stems from gcc defaulting to gnu23 which does not allow for these constructions of arbitrary argument lists anymore.
Dis you see those warnings? Please share your logs.

These can be fixed sloppy by using the following configure invocation

./configure CC="gcc -std=gnu99"

The correct solution would be to adjust configure.ac

This then leaves the deprecated openssl functions. This should probably be fixed by that patch you mentioned. Can you share a link to that?

Edit: Also have look at ruby2.72 in the AUR and see if you can adopt their solution here.

Last edited by lmn (Yesterday 11:52:19)

Offline

Board footer

Powered by FluxBB