On Debian11/KDE debsums | grep -v OK showed /lib/x86_64-linux-gnu/libgcc_s.so.1 as REPLACED. "Replaced" means that "The file has been replaced by a file from a different package."

This isn't how things are supposed to be so how can one find out why (e.g. by which package) it was replaced? What should be done about this?

sha256sum /lib/x86_64-linux-gnu/libgcc_s.so.1 returns 2d771c2e232fce107c7ec7f9a64b9a804e6d6737063088a2d8096b149a0af8cd.

  • 1
    What's the output of dpkg -S /lib/x86_64-linux-gnu/libgcc_s.so.1?
    – muru
    Jan 5, 2022 at 1:22
  • @muru it's libgcc-s1:amd64: /lib/x86_64-linux-gnu/libgcc_s.so.1. I don't think it could have been caused by running CXX="gcc" cmake .. and most of the time permissions are set to sudo chmod 0444 /usr/bin/gcc. Apper shows libgcc was installed only years ago (via it?). I also ran grep -rnisI "gcc" /var/log/dpkg.log* which only shows that linux-compiler-gcc-10-x86:amd64 was installed during the recent Debian upgrade. However, for bad reasons the dpkg.log files seem to be incomplete (but that's a separate issue).
    – mYnDstrEAm
    Jan 5, 2022 at 11:18
  • 1
    The file itself is fine, the checksum matches the canonical version in Debian 11 currently. Jan 5, 2022 at 12:09

1 Answer 1


I had the same issue on a Debian 11 amd64 system. Here's how I fixed it.

Search for the file here:

grep -Hin libgcc_s.so.1 /var/lib/dpkg/info/*.md5sums

On my system two packages were found: libgcc-s1:amd64 and libgcc1:amd64. libgcc1 is from an older Debian version and no longer is available from Debian 11's repository.

It turned out to be related to an older gcc version that was still installed, but which I no longer needed.

Found by searching for all packages which are no longer available from repository:

comm -23 --nocheck-order <(awk '/^Package: / {print $2}' /var/lib/dpkg/status | sort) <(awk '/^Package: / {print $2}' /var/lib/apt/lists/*_Packages | sort)

After removing gcc-8-base:amd64 and libgcc1:amd64 the debsums REPLACED message was gone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .