From c20b4fa89cccc37e99fbf6ad70ef708eea2ee05e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Apr 2026 18:37:02 +0000 Subject: [PATCH 1/2] fix(steamcmd): add libtinfo.so.5 symlink fix for readline warning On distros shipping libtinfo.so.6 but not libtinfo.so.5 (Ubuntu 22.04+, Debian 12+), SteamCMD prints: WARNING: Failed to load 32-bit libtinfo.so.5 or libncurses.so.5. Please install (lib32tinfo5 / ncurses-libs.i686 / equivalent) to enable readline. lib32tinfo5 does not exist on Ubuntu 24.04. Creating a user-space symlink inside the steamcmd directory resolves the warning without requiring root or a missing package. --- lgsm/modules/fix_steamcmd.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lgsm/modules/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh index 0ba5c85b24..9a0546251e 100755 --- a/lgsm/modules/fix_steamcmd.sh +++ b/lgsm/modules/fix_steamcmd.sh @@ -113,6 +113,25 @@ if [ ! -f "${steamclientsdk32}" ]; then fn_fix_msg_end fi +# Helps fix: WARNING: Failed to load 32-bit libtinfo.so.5 or libncurses.so.5. +# On distros that ship libtinfo.so.6 (e.g. Ubuntu 22.04+, Debian 12+) but not +# libtinfo.so.5, SteamCMD prints this warning and loses readline support. +# Creating a symlink from .so.5 -> .so.6 resolves the warning without root. +libtinfo32dir="${HOME}/.steam/steamcmd" +libtinfo32so="${libtinfo32dir}/libtinfo.so.5" +if [ ! -f "${libtinfo32so}" ] && [ ! -L "${libtinfo32so}" ]; then + # Find the .so.6 in the system 32-bit lib paths + for libtinfo32so6 in /lib/i386-linux-gnu/libtinfo.so.6 /usr/lib/i386-linux-gnu/libtinfo.so.6 /lib32/libtinfo.so.6; do + if [ -f "${libtinfo32so6}" ]; then + fixname="libtinfo.so.5 32-bit symlink" + fn_fix_msg_start + ln -sf "${libtinfo32so6}" "${libtinfo32so}" + fn_fix_msg_end + break + fi + done +fi + # steamclient.so fixes if [ "${shortname}" == "bo" ]; then fn_fix_steamclient_so "32" "${serverfiles}/BODS_Data/Plugins/x86" From 3ab837ff2fb17faf2d1e1cfae3a8369df34960df Mon Sep 17 00:00:00 2001 From: LinuxGSM Date: Fri, 24 Apr 2026 17:33:42 +0000 Subject: [PATCH 2/2] fix(steamcmd): address Copilot review feedback on libtinfo symlink fix - Iterate over all candidate steamcmd dirs (HOME/.steam/steamcmd, steamcmddir, HOME/.local/share/Steam/steamcmd) matching the pattern used for steamclient.so fixes elsewhere in the module - Replace '! -f && ! -L' guard with '! -e' so broken/dangling symlinks are also repaired rather than silently skipped - Add mkdir -p before ln in case the directory does not exist yet - Capture exitcode=$? after ln so fn_fix_msg_end reports failures --- lgsm/modules/fix_steamcmd.sh | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/lgsm/modules/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh index 9a0546251e..36bc378ac7 100755 --- a/lgsm/modules/fix_steamcmd.sh +++ b/lgsm/modules/fix_steamcmd.sh @@ -117,20 +117,26 @@ fi # On distros that ship libtinfo.so.6 (e.g. Ubuntu 22.04+, Debian 12+) but not # libtinfo.so.5, SteamCMD prints this warning and loses readline support. # Creating a symlink from .so.5 -> .so.6 resolves the warning without root. -libtinfo32dir="${HOME}/.steam/steamcmd" -libtinfo32so="${libtinfo32dir}/libtinfo.so.5" -if [ ! -f "${libtinfo32so}" ] && [ ! -L "${libtinfo32so}" ]; then - # Find the .so.6 in the system 32-bit lib paths - for libtinfo32so6 in /lib/i386-linux-gnu/libtinfo.so.6 /usr/lib/i386-linux-gnu/libtinfo.so.6 /lib32/libtinfo.so.6; do - if [ -f "${libtinfo32so6}" ]; then - fixname="libtinfo.so.5 32-bit symlink" - fn_fix_msg_start - ln -sf "${libtinfo32so6}" "${libtinfo32so}" - fn_fix_msg_end - break +for libtinfo32dir in "${HOME}/.steam/steamcmd" "${steamcmddir}" "${HOME}/.local/share/Steam/steamcmd"; do + if [ -d "${libtinfo32dir}" ]; then + libtinfo32so="${libtinfo32dir}/libtinfo.so.5" + # Also repair broken symlinks (! -e catches missing target, -L catches dangling link) + if [ ! -e "${libtinfo32so}" ]; then + # Find the .so.6 in the system 32-bit lib paths + for libtinfo32so6 in /lib/i386-linux-gnu/libtinfo.so.6 /usr/lib/i386-linux-gnu/libtinfo.so.6 /lib32/libtinfo.so.6; do + if [ -f "${libtinfo32so6}" ]; then + fixname="libtinfo.so.5 32-bit symlink" + fn_fix_msg_start + mkdir -p "${libtinfo32dir}" + ln -sf "${libtinfo32so6}" "${libtinfo32so}" + exitcode=$? + fn_fix_msg_end + break + fi + done fi - done -fi + fi +done # steamclient.so fixes if [ "${shortname}" == "bo" ]; then