Closed HideyoshiNakazone closed 3 years ago
I am having this exact same issue, too. Here's some details about my running environment:
I am not an expert or anything, but it seems to me that the problem is with the installed version of Python. The extension seems to rely on some package from Python 3.6, whereas Ubuntu 20.04 ships with Python 3.8.
I wonder how this issue could be addressed for Focal Fossa users? Shoud we downgrade our Python version? I'm afraid this would break something on Ubuntu though. Can someone please point me on some good direction?
Cheers!
So, I did some more digging, and here's what I've found:
So apparently, there's nothing one could do about this right now, but either switch back to Ubuntu 18.04 or sit back and hope that the dev team will upgrade the dependency on Python to version 3.8.
Or, alternatively - but I strongly recommend NOT doing so, even though it seems to work - you can work around it like this:
Install Python 3.6 (you don't need to unisntall the current version, you can have multiple versions alongside). You can use deadsnakes' PPA for that. Up to this point, nothing too messy.
Then (and this is the messed up part), follow the instructions in the accepted answer on this discussion, to symlink your libffi dependency to libffi7, tricking your Python runtime to think it is using the correct library version. However, it is hard to predict what kinds of other issues this could cause. I wouldn't really recommend doing so, so do it at your own risk!
Technically i could just downgrade my Debian package of python because i mainly use Anaconda Python for my works. Thanks a lot for the response!
This solution of manually install libffi.so.6
worked for me on Ubuntu 20.04. It is hacky (as it is not suggested to manually install packages in Ubuntu), it seems the least hackiest so far. I also did not need Python 3.6. Though, I have not tested this extension yet to know how well it works.
Chiming in two years later here. I just want to say that this is still a problem. Indeed, manually installing the deb package for libffi6 appears to have fixed the issue. However, I don't consider that to be a real solution worthy of marking this as closed. This is going to affect all future Ubuntu/WSL versions. I guess there just aren't that many people using the VSCode Postgres extension with that specific combination?
Steps to Reproduce: