Fix an rsyslog startup error involving libgcc_s.so.1
Check the missing GCC runtime library, architecture, loader paths, and container compatibility before modifying the system linker configuration.
An error naming libgcc_s.so.1 usually means that a required GCC runtime library could not be loaded. A missing package is one cause. An incompatible architecture, broken symlink, different container filesystem, or mismatched libc can produce a similar failure.
Inspect the environment that actually fails
Run checks inside the affected host or container, using the same filesystem as the service:
find /lib /usr/lib /usr/local/lib -name 'libgcc_s.so.1' 2>/dev/null
file /usr/sbin/rsyslogd
Adjust the executable path for the installation. Typical locations include /lib/x86_64-linux-gnu/libgcc_s.so.1 on x86-64 Debian-family systems and /usr/lib64/libgcc_s.so.1 on some RHEL-family systems. Other architectures use different paths.
Inspect the library with file and check its symlink target. A library found on the host is irrelevant if the failing container cannot see it.
Restore the matching distribution package
On supported Debian or Ubuntu releases, the package is commonly:
sudo apt install libgcc-s1
On RHEL-family releases using DNF:
sudo dnf install libgcc
Older releases may use Yum or a different package name. Prefer the package matching the running distribution and architecture. If the installed file is damaged, reinstall or repair the package rather than copying an arbitrary library from another machine.
Check loader resolution on glibc systems
ldconfig -p | grep 'libgcc_s'
ldd /usr/sbin/rsyslogd
Use ldd only for a trusted executable. Also note that a library loaded at runtime may not appear as a direct dependency in its output.
The dynamic-loader manual explains the search paths and cache. Standard distribution directories normally need no new entry. If an intentional custom library directory is missing from the configuration, add that directory to an included file under /etc/ld.so.conf.d/, then run sudo ldconfig.
A file's .conf suffix matters only insofar as it matches the include pattern in /etc/ld.so.conf; it is not a universal loader rule. Do not add an architecture-specific path blindly. LD_LIBRARY_PATH can help a controlled diagnostic command, but it is not a reliable service-wide repair and is ignored in some secure-execution contexts.
Treat minimal images separately
Alpine uses musl and can install its own libgcc package with apk add libgcc. That does not make a glibc-linked rsyslog binary compatible with Alpine. Build or install rsyslog for the image's actual libc and architecture, including its runtime dependencies.
After repairing the environment, validate rsyslog's configuration and restart through its service manager. Recheck the original startup error; a populated linker cache alone does not prove that the service can load the required library.
Contact us
Join the community
to join the community
Try Guance
Start online and pay only for what you use.
Get startedChoose a Guance plan