Comment 4 for bug 1775673

Revision history for this message
Iain Parris (ipv2) wrote : Re: ruby-ncurses is broken in ubuntu 18.04

This ruby-ncurses bug causes sup-mail to crash in Ubuntu 18.04 with the following error:

Traceback (most recent call last):
 5: from /usr/bin/sup-mail:6:in `<main>'
 4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
 3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
 2: from /usr/lib/ruby/vendor_ruby/ncursesw.rb:23:in `<top (required)>'
 1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.5.0/ncursesw_bin.so: undefined symbol: set_menu_win - /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.5.0/ncursesw_bin.so (LoadError)

Workaround: manually build and install gem "ncursesw".

# See: https://github.com/sup-heliotrope/sup/issues/550#issuecomment-643757988
sudo apt install \
    build-essential \
    patch \
    ruby-dev \
    zlib1g-dev \
    liblzma-dev \
    libncurses5-dev \
    lib32ncurses5-dev \
    libncursesw5-dev
sudo gem install ncursesw

# Verify that ncursesw is functioning
ruby -e "require 'ncurses'" && echo "fixed"

Note that this Ubuntu bug is likely inherited from Debian Bug #892181 (ruby-ncurses fails to load with Ruby 2.5): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892181

The Debian bug was filed on 2018-03-06, at approximately the time that the Ubuntu 18.04 cut of Debian packages would have been taken. However, the upstream Debian bug is now fixed, as of 2018-06-13.