The classic snap
git-ubuntu is using the
awk binary from the core snap. This used to work but with the most recent update of the core snap this no longer works.
The reason is the following:
The core used to ship the following symlinks: /usr/bin/awk -> /etc/alternatives/awk -> /usr/bin/gawk
The git-ubuntu snap is setting PATH=/snap/core/current/usr/bin:…
This means that /snap/core/current/usr/bin/awk pointed the host /etc/alternative/awk which in turn points (usually) to /usr/bin/gawk which is the awk on the host
With 2.35.2 the core snap no longer ships /etc/alternatives - instead /usr/bin/awk in the core snap is a symlink to “awk” (in the same dir)
This means that now /snap/core/current/usr/bin/awk is the gawk from the core snap (and not the host)
The gawk from core is from xenial and needs libreadline.so.6 but when this is run on a bionic system only libreadline.so.7 is available by default on the host. So running /snap/core/current/usr/bin/awk leads to an error that libreadline.so.6 cannot be found.
Note that classic snaps that use binaries from core all face this problem, e.g. gpg from core also needs libreadline. This happend to work for awk on ubuntu by chance because /etc/alternatives was shipped in the core.
We are currently exploring the best fix for this, one obvious way is to set LD_LIBRARY_PATH into core when using PATH on core.