When:
- using newer compilers from Ubuntu test ppa (e.g. ppa:ubuntu-toolchain-r/test)
- ppa-purge later to revert the system to clean state
it is possible to get to dissastrous state where libgcc_s.so.1
is misssing.
In such state apt
and other applications may not work and system will not boot.
Boot to recovery terminal.
Locate ligcc_so.so.1
on your system (if you are lucky):
find / -name libgcc_s.so.1 2>/dev/null
Copy it (or link) to location where it is expected
cp your_path /lib/x86_64-linux-gnu/libgcc_s.so.1
After that your system should boot and apt should work.
Alternatively:
- copy from other machine
- check
/var/cache/apt/archives
, you may still have deb package to install it from
On a clean Ubuntu 18.04 machine it is possible to check where file comes from:
# on clean Ubuntu 18.04 machine
dpkg -S /lib/x86_64-linux-gnu/libgcc_s.so.1
# in my case:
# libgcc1:amd64: /lib/x86_64-linux-gnu/libgcc_s.so.1
Reinstall this package on your now working machine:
sudo apt-get --reinstall install libgcc1:amd64
This step is important if you do some deb packaging on your system. (you need sound apt state, able to track dependencies correctly)