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

Installing 3.3.2 fails on debian trixie - libncurses5-dev has unmet dependencies #484

Closed
robacarp opened this issue Jul 11, 2024 · 2 comments · Fixed by #485
Closed

Installing 3.3.2 fails on debian trixie - libncurses5-dev has unmet dependencies #484

robacarp opened this issue Jul 11, 2024 · 2 comments · Fixed by #485
Assignees
Labels

Comments

@robacarp
Copy link
Contributor

First off, this tool is amazing and has been amazing for years. Thank you.

Description

This is absolutely not a problem with ruby-install, but I hit the snag while using ruby-install so someone else might too. Perhaps it's something ruby-install can work around, but maybe not.

Steps To Reproduce

ARG RUBY_VERSION=3.2.3

FROM seleniarm/standalone-chromium

USER root

RUN apt-get update \
 && apt-get install -y build-essential

WORKDIR /opt
RUN \
  wget https://github.com/postmodern/ruby-install/releases/download/v0.9.3/ruby-install-0.9.3.tar.gz && \
  tar xzvf ruby-install-0.9.3.tar.gz && \
  cd ruby-install-0.9.3/ && \
  sudo make install

RUN ruby-install --cleanup ruby "${RUBY_VERSION}"

Building that dockerfile fails with this error:

#9 [6/6] RUN ruby-install ruby ${RUBY_VERSION}
#9 0.227 >>> Updating ruby versions ...
#9 0.498 >>> Installing ruby 3.3.4 into /opt/rubies/ruby-3.3.4 ...
#9 0.501 >>> Installing dependencies for ruby 3.3.4 ...
#9 0.504 
#9 0.504 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#9 0.504 
#9 0.508 Reading package lists...
#9 1.273 Building dependency tree...
#9 1.432 Reading state information...
#9 1.506 xz-utils is already the newest version (5.6.2-2).
#9 1.506 xz-utils set to manually installed.
#9 1.506 build-essential is already the newest version (12.10).
#9 1.506 Some packages could not be installed. This may mean that you have
#9 1.506 requested an impossible situation or if you are using the unstable
#9 1.506 distribution that some required packages have not yet been created
#9 1.506 or been moved out of Incoming.
#9 1.506 The following information may help to resolve the situation:
#9 1.506 
#9 1.506 The following packages have unmet dependencies:
#9 1.584  libncurses5-dev : Depends: libtinfo6 (= 6.4-4) but 6.5-2 is to be installed
#9 1.584                    Depends: libncurses-dev (= 6.4-4) but 6.5-2 is to be installed
#9 1.587 E: Unable to correct problems, you have held broken packages.
#9 1.588 !!! Installing dependencies failed!
#9 ERROR: process "/bin/sh -c ruby-install ruby ${RUBY_VERSION}" did not complete successfully: exit code: 255
------
 > [6/6] RUN ruby-install ruby ${RUBY_VERSION}:
1.506 requested an impossible situation or if you are using the unstable
1.506 distribution that some required packages have not yet been created
1.506 or been moved out of Incoming.
1.506 The following information may help to resolve the situation:
1.506 
1.506 The following packages have unmet dependencies:
1.584  libncurses5-dev : Depends: libtinfo6 (= 6.4-4) but 6.5-2 is to be installed
1.584                    Depends: libncurses-dev (= 6.4-4) but 6.5-2 is to be installed
1.587 E: Unable to correct problems, you have held broken packages.
1.588 !!! Installing dependencies failed!
------
loadtest.dockerfile:19
--------------------
  17 |     
  18 |     RUN echo RUN ruby-install ruby ${RUBY_VERSION}
  19 | >>> RUN ruby-install ruby ${RUBY_VERSION}
  20 |     
  21 |     # RUN rm -rf /var/lib/apt/lists/*
--------------------
ERROR: failed to solve: process "/bin/sh -c ruby-install ruby ${RUBY_VERSION}" did not complete successfully: exit code: 255

The install fails because the dependencies for libncurses5-dev are out of whack somewhere within the debian trixie configuration. It's easy to reproduce without ruby-install with just apt install libncurses5-dev. I don't really know enough about the debian maintainership world to begin to know who to contact about this issue -- probably someone within the curses team, but I'm out of my depth here.

As far as I'm concerned, ruby-install does a gigantic job of making ruby installations dead simple.

Here's what I don't know: Is it possible to work around this with ruby-build (or on my own)? Is that something ruby-install tries to do?

@robacarp robacarp added the bug label Jul 11, 2024
@postmodern postmodern self-assigned this Jul 11, 2024
@postmodern
Copy link
Owner

Looks like I should pick a more generic libncurses package name, like libncurses-dev.

@robacarp
Copy link
Contributor Author

robacarp commented Jul 11, 2024

That was enough to get me up and running, thank you. I disabled installing deps and ran the apt command manually, but with libncurses-dev instead of libncurses5-dev:

apt-get install -y xz-utils build-essential bison zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses-dev libffi-dev
ruby-install --no-install-deps ruby 3.3.2

Later:

>>> Successfully installed ruby 3.3.2 into /opt/rubies/ruby-3.3.2

robacarp added a commit to robacarp/ruby-install that referenced this issue Jul 11, 2024
trinitronx added a commit to LyraPhase/sprout-wrap that referenced this issue Jul 16, 2024
Part of the effort to decouple our Ruby installation as much as possible from
macOS, to insulate against the incessant changes pushed by Apple.

Similar to postmodern/ruby-install#484, we will also install `ncurses` from
Homebrew.  Avoiding Apple's system-installed version for any Ruby versions
installed using RVM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants