Skip to content

fix(steamcmd): add libtinfo.so.5 symlink fix for readline warning#4899

Open
dgibbs64 wants to merge 1 commit intodevelopfrom
fix/steamcmd-libtinfo
Open

fix(steamcmd): add libtinfo.so.5 symlink fix for readline warning#4899
dgibbs64 wants to merge 1 commit intodevelopfrom
fix/steamcmd-libtinfo

Conversation

@dgibbs64
Copy link
Copy Markdown
Member

Description

On distros that ship libtinfo.so.6 but not libtinfo.so.5 (Ubuntu 22.04+, Debian 12+), SteamCMD prints the following warning at every run:

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 22.04+ / Debian 12+ — the package was removed when ncurses transitioned to libtinfo6. This means there is no apt package to install to resolve the warning on modern distros.

Fix

In fix_steamcmd.sh, create a user-space symlink ~/.steam/steamcmd/libtinfo.so.5 -> /lib/i386-linux-gnu/libtinfo.so.6 (or equivalent path) when the .so.5 file is absent. This requires no root access and resolves the warning for all SteamCMD-based game servers.

Testing

Tested on Ubuntu 24.04 LTS — warning no longer appears after the symlink is created.

Copilot AI review requested due to automatic review settings April 19, 2026 18:37
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.
@dgibbs64 dgibbs64 force-pushed the fix/steamcmd-libtinfo branch from d0ca2c5 to c20b4fa Compare April 19, 2026 18:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a SteamCMD runtime fix for modern distros missing libtinfo.so.5, and introduces TF2 Classified (tf2c) server support which relies on downloading a base appid into a separate support directory.

Changes:

  • Add a user-space libtinfo.so.5 -> libtinfo.so.6 symlink workaround in fix_steamcmd.sh.
  • Add baseappid download support in the SteamCMD download flow (download base app into supportdir before appid into serverfiles).
  • Register new tf2c server (server list entry + default config + config install handling).

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lgsm/modules/install_config.sh Adds config discovery/installation handling for tf2c.
lgsm/modules/fix_steamcmd.sh Creates a libtinfo.so.5 symlink to suppress SteamCMD readline warnings on newer distros.
lgsm/modules/core_dl.sh Implements baseappid download (to supportdir) before downloading appid.
lgsm/data/serverlist.csv Registers tf2c in the supported server list.
lgsm/config-default/config-lgsm/tf2cserver/_default.cfg Adds default LinuxGSM config for the new tf2cserver.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +127 to +128
fn_fix_msg_start
ln -sf "${libtinfo32so6}" "${libtinfo32so}"
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symlink creation can fail if ${HOME}/.steam/steamcmd does not exist yet (fresh install / before SteamCMD has run). Consider mkdir -p "${libtinfo32dir}" before ln, and capture exitcode=$? after ln so fn_fix_msg_end reports failures correctly.

Suggested change
fn_fix_msg_start
ln -sf "${libtinfo32so6}" "${libtinfo32so}"
fn_fix_msg_start
if [ ! -d "${libtinfo32dir}" ]; then
mkdir -p "${libtinfo32dir}"
fi
ln -sf "${libtinfo32so6}" "${libtinfo32so}"
exitcode=$?

Copilot uses AI. Check for mistakes.
# 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
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guard if [ ! -f ... ] && [ ! -L ... ] skips the fix when libtinfo.so.5 exists as a broken symlink (-L true but target missing). Using an existence check like ! -e (or explicitly handling -L + ! -e) would let the script repair broken links and still avoid overwriting valid files.

Suggested change
if [ ! -f "${libtinfo32so}" ] && [ ! -L "${libtinfo32so}" ]; then
if [ ! -e "${libtinfo32so}" ]; then

Copilot uses AI. Check for mistakes.
Comment on lines +120 to +133
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
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new libtinfo fix hard-codes ${HOME}/.steam/steamcmd, but elsewhere in this module SteamCMD artifacts are searched in multiple locations (e.g. ${steamcmddir} and ${HOME}/.local/share/Steam/steamcmd). To ensure the warning is actually resolved in all supported setups, consider applying the symlink fix to the active SteamCMD directory (or iterating through the same candidate directories used for steamclient.so).

Suggested change
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
for libtinfo32dir in "${HOME}/.steam/steamcmd" "${steamcmddir}" "${HOME}/.local/share/Steam/steamcmd"; do
if [ -d "${libtinfo32dir}" ]; then
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
fi
done

Copilot uses AI. Check for mistakes.
@dgibbs64 dgibbs64 force-pushed the develop branch 2 times, most recently from 8d80501 to fdb8625 Compare April 19, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants