Score:0

Failed to build Ruby via rbenv on Ubuntu 21.10

cn flag

No matters what kind of options I'm going to use (including the suggestions on the rbenv site), I'm struggling to install ruby.

I always get the following error message

    Downloading ruby-3.0.3.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.gz
Installing ruby-3.0.3...
ruby-build: using readline from homebrew

BUILD FAILED (Ubuntu 21.10 using ruby-build 20211124)

Inspect or clean up the working tree at /tmp/ruby-build.20211125103437.425673.LUEnWK
Results logged to /tmp/ruby-build.20211125103437.425673.log

Last 10 log lines:
checking pthread.h presence... yes
checking for pthread.h... yes
checking if make is GNU make... yes
.ext/include/x86_64-linux/ruby/config.h updated
configure: ruby library version = 3.0.0
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating Makefile
config.status: creating ruby-3.0.pc
./config.status: line 1207: /home/linuxbrew/.linuxbrew/opt/zlib/lib/pkgconfig: Is a directory

I initially thought this was connected to some of the export in the ~/.zshrc file, e.g. the CPPFLAGS, but this is not the case. OpenSSL, either the 1.1 or the 3.0 accordingly changed in the RUBY_CONFIGURE_OPTS doesn't seem to help. But in fact is not even mentioned in the output as the source of the problem as I've noticed in other answers.

I also tried to install an old version, but again the same problem thus suggesting there is some compiler missing, but at this stage I'm ignoring which.

In the same computer I have also Python installed, which - as far as I skimmed - seems to cause some problems? This should have in theory wiped out by excluding the previous flags.

Any idea on how to solve?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.