Skip to content

Instantly share code, notes, and snippets.

@GuillaumeDesforges
Created January 17, 2022 11:07
Show Gist options
  • Save GuillaumeDesforges/1c499ab25c53edc0a1ca6cf2faacfe87 to your computer and use it in GitHub Desktop.
Save GuillaumeDesforges/1c499ab25c53edc0a1ca6cf2faacfe87 to your computer and use it in GitHub Desktop.
for dir in ~/.vscode-server*/bin/*
do
node=$dir/node
echo Fixing $node
rm -v $node
ln -vs $(which node) $node
rm -vf $dir/vscode-remote-lock*
done
GCCLIB=$(dirname $(gcc -print-file-name=libstdc++.so.6))
LOADER=$(dirname $(gcc -print-file-name=ld-linux-x86-64.so.2))
find ~/.vscode*/extensions/ ~/.config/Code -type f -perm -100 -print0 | xargs -0 file \
| grep 'interpreter /lib' | cut -d: -f1 | while read f; do
echo "Patching $f" >&2
patchelf --set-interpreter "$LOADER" "$f"
# RPATH=$(patchelf --print-rpath "$f")
# patchelf --set-rpath "${RPATH+RPATH:}$GCCLIB" "$f"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment