django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/app/.apt/usr/lib/libmsodbcsql-18.3.so.2.1' : file not found (0) (SQLDriverConnect)")

My django heroku app is building but fails during the release process with the error below. I have followed the CodeWithMosh storefront course but have run into this error. Any help would be appreciated.

django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/app/.apt/usr/lib/libmsodbcsql-18.3.so.2.1' : filo.2.1' : file not found (0) (SQLDriverConnect)") I am using vscode in windows. I followed the CodeWithMosh process and I can run the db in dev mode on my machine.

Below is a snip of the requirements.txt file.

Django==5.0.3
django-filter==23.5
django-heroku==0.3.1
docopt==0.6.2
pymssql==2.2.11
pyodbc==5.1.0
sqlparse==0.4.4

virtualenv==20.25.1

My AptFile configuration is below.

`unixodbc
unixodbc-dev
https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/m/msodbcsql18/msodbcsql18_18.3.2.1-1_arm64.deb`

I have installed the MSSQL build pack, and the associated UBUNTU build packs.

django.db.utils.Error: (‘01000’, “[01000] [unixODBC][Driver Manager]Can’t open lib ‘/app/.apt/usr/lib/libmsodbcsql-18.3.so.2.1’ : filo.2.1’ : file not found (0) (SQLDriverConnect)”)

The first buildpack: ``https://github.com/heroku/heroku-buildpack-apt.git The second buildpack: ``https://github.com/heroku/heroku-buildpack-python.git The last buildpack: ``https://github.com/heroku-softtrends/heroku-python-pyodbc-buildpack.git

Heroku support states this outside of their support (which I find… uh unfortunate).

Any thoughts or suggestions are most welcome. Thx

I have re-ran pipenv install pyodbc and pip freeze requirements.txt, but still have the same release fail after a successful build.

remote: -----> Finished adding ODBC Driver 18 for SQL Server
remote: -----> Discovering process types
remote: Procfile declares types → release, web
remote:
remote: -----> Compressing…
remote: Done: 182.5M
remote: -----> Launching…
remote: ! Release command declared: this new release will not be available until the command succeed .remote: Released v92
remote: https://saidm-prod-e3e8956a12fc.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy… done.
remote: Running release command…
remote:
remote: Traceback (most recent call last):
remote: File “/app/.heroku/python/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 275, in ensure_connection
remote: self.connect()

django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/app/.apt/usr/lib/libmsodbcsql-18.3.so.2.1' : file not found (0) (SQLDriverConnect)")