This is really just a heads up as I found a solution.
Ok went back to the drawing board and this time decided to install via deb on a newish system.
I got the above error
a quick google search returned this
opened 03:15AM - 02 May 20 UTC
- PGSQL Extension Version: ```0.3.0```
- VSCode Version: ```1.44.2```
- OS Ve… rsion:
```
Ubuntu 20.04 LTS (Focal Fossa)
Linux 5.4.0-28-generic #32-Ubuntu SMP Wed Apr 22 17:40:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
```
Steps to Reproduce:
1. Install ext
2. Ctrl + Shift + P
3. PostgreSQL: New Query
the ouput is
```
Initializing PostgreSQL tools service for the PostgreSQL extension.
Note: PostgreSQL commands will be available after installing the service.
Platform-------------: linux, x86_64, name=ubuntu, version=20.04 (Ubuntu16)
Installing PostgreSQL tools service to /home/jibarra/.vscode/extensions/ms-ossdata.vscode-postgresql-0.3.0/pgsqltoolsservice/v1.4.0/Ubuntu16.
Downloading https://github.com/Microsoft/pgtoolsservice/releases/download/v1.4.0/pgsqltoolsservice-linux-x64.tar.gz
(21369 KB) ...
```
```
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/cx_Freeze/initscripts/__startup__.py", line 14, in run
File "/usr/local/lib/python3.6/dist-packages/cx_Freeze/initscripts/Console.py", line 26, in run
File "pgsqltoolsservice/pgtoolsservice_main.py", line 11, in <module>
File "/usr/local/lib/python3.6/dist-packages/ptvsd/__init__.py", line 17, in <module>
File "/usr/local/lib/python3.6/dist-packages/ptvsd/attach_server.py", line 35, in <module>
File "/usr/local/lib/python3.6/dist-packages/ptvsd/visualstudio_py_debugger.py", line 24, in <module>
File "/usr/lib/python3.6/ctypes/__init__.py", line 7, in <module>
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
[Error - 9:52:03 p. m.] Connection to server got closed. Server will not be restarted.
```
I tried this
`sudo dpkg -S libffi.so`
```
libffi7:amd64: /usr/lib/x86_64-linux-gnu/libffi.so.7.1.0
libffi7:amd64: /usr/lib/x86_64-linux-gnu/libffi.so.7
```
`sudo ln /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6`
reboot, this solve the problem but not its the best solution
The way that worked for me was
wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
sudo apt install ./libffi6_3.2.1-8_amd64.deb
I also needed to add numpy even though the deb didn’t ask for it.