Raspberry Pi OSを最新にアップデート
sudo apt update
sudo apt full-upgrade
念の為再起動
sudo reboot
PostgreSQL 13のリポジトリを追加
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt update
sudo apt install postgresql-13 postgresql-client-13 postgresql-13-postgis-3
接続
sudo su - postgres
psql
PostGISエクステンションの追加
postgres=# create extension postgis;