I am trying to deploy Flask web app on the Azure App Service. This app is using pyodbc to connect to mssql; however, when I deploy the app I get this error
ImportError: libodbc.so.2: cannot open shared object file: No such file or directory
I got to know that I can solve this issue by installing unixodbc/unixodbc-dev with the following line:
sudo apt-get install unixodbc-dev
I tried to do this manually by accessing the SSH of Kudu; however, the issue still persists.
I am using a local repository and pushing the code with git to Azure. When I get this error, I can't access the console from Kudu, so I had to comment the code and push again. Then I tried to install this package manually by doing apt-get install unixodbc-dev (because sudo is not recognized) and it works well. Then I pushed the code again with pyodbc on it and the same error is showing. I think the packages are being erased each time I do that since I found some of the folders created by this packages being deleted after the push action.
The error I always get is as follow: