# 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)")

**URL:** <https://forum.codewithmosh.com/t/django-db-utils-error-01000-01000-unixodbc-driver-manager-cant-open-lib-app-apt-usr-lib-libmsodbcsql-18-3-so-2-1-file-not-found-0-sqldriverconnect/25978>\
**Category:** Django\
**Created:** [April 4, 2024, 11:05pm UTC](https://forum.codewithmosh.com/t/django-db-utils-error-01000-01000-unixodbc-driver-manager-cant-open-lib-app-apt-usr-lib-libmsodbcsql-18-3-so-2-1-file-not-found-0-sqldriverconnect/25978 "2024-04-04T23:05:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott.sandwith](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@scott.sandwith](https://forum.codewithmosh.com/u/scott.sandwith)\
**Post date:** [April 4, 2024, 11:05pm UTC](https://forum.codewithmosh.com/t/django-db-utils-error-01000-01000-unixodbc-driver-manager-cant-open-lib-app-apt-usr-lib-libmsodbcsql-18-3-so-2-1-file-not-found-0-sqldriverconnect/25978/1 "2024-04-04T23:05:04Z")

</div>

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.

```auto
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.

```auto
`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/](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)")`
