-
Notifications
You must be signed in to change notification settings - Fork 148
No usable version of the libssl was found #236
Comments
Just writing to say "me too"
This is running from a debian testing system (openssl 1.1.1g-1) with the following installed in the venv:
|
same |
Same here |
ok i got it working... here's the dockerfile
pls note that newer version of libssl won't work. seems to be only working with 1.0.0 |
I would complete your Dockerfile with an entrypoint: FROM python:3.7-slim
RUN echo "deb http://ftp.us.debian.org/debian/ jessie main" >>/etc/apt/sources.list
RUN apt-get update && apt-get install -y libicu63 libssl1.0.0 libffi-dev libunwind8 python3-dev && pip install --upgrade pip && pip install mssql-scripter
ENTRYPOINT ["mssql-scripter"] You should build the image with #!/bin/sh
set -e
docker run --rm -it mssql-scripter "$@" |
I get this problem using any seemingly newer distro (which doesn't come with the older version of OpenSSL). I managed to downgrade the system version of libssl (to 1.0.0) on a personal Arch VM and then mssql-scripter worked, but I wouldn't really want to do that on a real machine - plus I'm restricted to using WSL (so Ubuntu 20.04 with OpenSSL 1.1.1f 31 Mar 2020) at work and so can't do the same steps. I have tried copying libssl.so.1.0.0 into my lib directory on Ubuntu/WSL and running ldconfig (wondering whether, if I have the lib, wouldjust mssql-scripter will use it and not the whole system), but I still get the same problem. Is it an actual incompatibility or do we just need a new release which is aware of the newer SSL library? UPDATE |
Why don't you use docker image? This would be much simpler than messing up you distro with old libssl. Nevertheless, in my own experience this tool doesn't work well to extract real world SQL schema, and fail miserably with an error and some random SQL statements. |
Boo! Seems everything from MS is completely dysfunctional on anything remotely modern. I can confirm the above fix (adding the jessie repo and installing the old version) works. |
Having same issue. Using dockerfile as prescribed above also didn't work. BUMP! |
Adding the Jessie repo to the latest python:3.7-slim doesn't work anymore due to some sort of key signing issue (as in #236 (comment)), so I ended up downloading the .deb file from https://packages.debian.org/jessie/amd64/libssl1.0.0/download and then copying it into Docker: FROM python:3.7-slim
ENV TERM dumb
RUN apt-get update && apt-get install -y libicu63 libffi-dev libunwind8 multiarch-support
COPY libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb .
RUN dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb
RUN pip install --upgrade pip && pip install mssql-scripter==1.0.0a23
ENTRYPOINT ["mssql-scripter"] |
Bump? Anyone from Microsoft actually using this? This is BROKEN and the library you forcibly reference is ancient. |
Update for anyone still reading this a year later: if you're dockerizing your usage of this, you can do the following. Note the python tag. This is two years old so this is unacceptable as a long-term hack, but should hold us over short term. Note that you have to install an ancient version of libicu as well since this is, well, # Terrible hack required to get MS's tools to work.
FROM python:3.6-slim-jessie AS sqlgen
RUN apt-get update && apt-get install -y --no-install-recommends freetds-bin sed libunwind8 libicu52 libssl1.0.0
RUN pip install --upgrade pip
RUN pip install mssql-scripter
... |
Thanks for your help and suggestions. |
There is another workaround for this. MSSQLTOOLSSERVICE_PATH=~/path/to/extracted/sqltoolsservice-folder/ mssql-scripter -U sa -Pwhatever -d mydb --server=localhost --script-create -f ./out.sql Note that for me, the |
I have tested that under Fedora 34 too. It is also possible to replace the folder sqltoolsservice in your python package folder. The provided sqltoolsservice is using an old dotnetcore library with defaults to Open SSL 1.0.x It should also be possible to package a private mssql-scripter version with a replaced tar.gz or zip files. |
For newcomers, who for some reasons couldn't use docker for this: I'm able using this workaround with this version of sqltoolsservice, but had to do one more step and manually patch the main.py to use 'utf-16' after installation:
|
@snippins that is just brilliant, and works wonderfully. Any ideas on what changed (in sqltoolsservice, presumably) to make it necessary for the character encoding to be UTF-16? Do you think a PR would be welcome? It would require updating sqltoolsservice, and testing to ensure the it still works on a variety of Linux distros, as well as Win and Mac |
@bowmanjd I would strongly assume that this was a side effect from updating from Python 2 to 3 where strings went from just being bytes to requiring valid UTF-8. I assume a PR fixing this would make sense, it seems this project has gained some activity again. |
Can you give some instructions on how did you do it? Do I have to pull the repo, patch it and build it or can i just patch an already installed version(pip install mssql-scripter)? If i can patch an already installed version, where do the files usually go? |
@davisriska Note that I was able to sidestep the encoding issue without any patch, just using the |
Ahh, I wish I read this before I figured out how to patch it in inside a docker image I was building. For anyone having trouble here is what I did to make it work.
|
How would I write queries with this? |
@shanike can you help us understand how your question pertains to the libssl and sqltoolsservice issue described here? Are you having similar issues? |
Hi yes I had the same issue as described, (no docker) and when using the env variable and |
1 similar comment
Hi yes I had the same issue as described, (no docker) and when using the env variable and |
August 2023 version ;-)
|
thanks man, it soled the problem. |
after installing it on python:2 docker container i get error.
I have openssl (1.1.1d-0+deb10u3) on the docker
The text was updated successfully, but these errors were encountered: