ODBC Driver 18 for SQL Server

Hi Team,
I am creating one sample website for learning web app development. On that I am connecting azure sql database. When I would like to connect that, I am facing issue with “ODBC Driver 18 for SQL Server installing”.

In the local desktop I have installed it manually and it’s working fine, but how can I install that in render hosting platform before deploying the image.
This is the build log:

File “/opt/render/project/src/database.py”, line 25, in

May 31 08:04:52 AM conn = pyodbc.connect(connectionString)

May 31 08:04:52 AM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

May 31 08:04:52 AMpyodbc.Error: (‘01000’, “[01000] [unixODBC][Driver Manager]Can’t open lib ‘ODBC Driver 18 for SQL Server’ : file not found (0) (SQLDriverConnect)”)

Some please assist with detailed step as I am very new to this topic.

If I would like to add docker file with instructions, where is the option for that, and how can I write that.

Hi,

ODBC drivers are not installed on Render Native Runtimes. A quick search for “ODBC 18 Linux” brings up Microsofts docs on installing the drivers. However, they show sudo and apt commands which aren’t permitted on Render Native Runtimes.

To install custom OS-level packages like ODBC, you would need to use Docker so that you can set up the environment as your project requires. Then deploy that to Render.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.