From 3148689f78fca33f2fbea2e494d5dc26c7f1b3ca Mon Sep 17 00:00:00 2001 From: Echo Date: Tue, 28 Apr 2026 13:16:07 +0000 Subject: [PATCH] Update README.md - add PostgreSQL official repo option for older Ubuntu --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 8d853aa..0d7f9c1 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,39 @@ wget https://gitea-lxc.moon-dragon.us/echo/linux_patch_manager/releases/download ### 2. Install Dependencies +**Option A: Ubuntu 24.04 (has PostgreSQL 16 in repositories)** + ```bash sudo apt update sudo apt install -y postgresql-16 libssl3 ``` +**Option B: Older Ubuntu versions (add PostgreSQL official repository)** + +```bash +# Add PostgreSQL official repo +sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + +# Import signing key +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - + +# Update and install +sudo apt update +sudo apt install -y postgresql-16 libssl3 +``` + +**Check your Ubuntu version:** + +```bash +lsb_release -a +``` + +| Ubuntu Version | Default PostgreSQL | Use Option | +|----------------|-------------------|------------| +| 24.04 LTS (Noble) | 16 | A | +| 22.04 LTS (Jammy) | 14 | B | +| 20.04 LTS (Focal) | 12 | B | + ### 3. Install the Package ```bash