'error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory

I am trying to open visual studio code in my wsl nevertheless i have this error below. How to solve that?

To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the `code` command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.
/usr/share/code/bin/../code: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory


Solution 1:[1]

I added the following libraries and seemed to spring to life somewhat

sudo apt install libxshmfence1 libglu1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Erik