# ERROR: could not open extension control file ".../postgis.control": No such file or directory

**Code:** `extension not available` · **Category:** PostgreSQL · **Seen on:** PostgreSQL

CREATE EXTENSION failed because the extension’s files aren’t installed on the server.

## Meaning

Extensions like postgis, pgvector or timescaledb need OS packages (or a Docker image that includes them). Managed services only support a listed set.

## Common causes

- Extension package not installed for this PostgreSQL version
- Plain postgres Docker image without the extension
- Managed service doesn’t support it

## Quick fix

1. Install the package (apt install postgresql-16-postgis-3 / postgresql-16-pgvector)
2. Use an image with the extension (postgis/postgis, pgvector/pgvector)
3. Check the provider’s supported extensions

## Detailed fix by platform

### Docker

1. `image: pgvector/pgvector:pg16`

## How to diagnose

1. **Package** — Installed for this major version?
2. **Recent change** — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/postgresql/extension-is-not-available)
