How to install postgresql 17?

I’m trying to install the latest postgresql stable version for manjaro. In the past 10 years, I was using Ubuntu, and the pgdg repository was always working for me, as described here:

https://wiki.postgresql.org/wiki/Apt

I’m trying to achieve the same on manjaro. The default “latest” is extra/postgresql 16.3 in the official repository:

1 extra/postgresql 16.3-4 (18.6 MiB 62.0 MiB)

Then I tried yay postgresql17 and it failed to build. Here are the last few lines:

g++ -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -ffat-lto-objects -Wno-deprecated-declarations -fPIC -fvisibility=hidden -shared -o llvmjit.so  llvmjit.o llvmjit_error.o llvmjit_inline.o llvmjit_wrap.o SectionMemoryManager.o llvmjit_deform.o llvmjit_expr.o -L../../../../src/port -L../../../../src/common  -Wl,-rpath,/opt/postgresql17/lib -L/usr/lib  -Wl,--as-needed -fvisibility=hidden -lLLVM-18 
make[2]: Leaving directory '/home/gandalf/.cache/yay/postgresql17/src/postgresql-17.2/src/backend/jit/llvm'
make[1]: Leaving directory '/home/gandalf/.cache/yay/postgresql17/src/postgresql-17.2/src'
==> HIBA: Hiba történt a build()-ben.
    Megszakítás...
 -> error making: postgresql17-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
postgresql17-libs - exit status 4
postgresql17 - exit status 4

I don’t see any useful error message that would explain the error. Only “exit status 4”, it does not help too much.

I’m not sure why it failed to build on your system using yay - I just had no issues building it using Pamac:

pamac build postgresql17
opt/postgresql17/lib/pgxs/src/Makefile.global
==> Creating package "postgresql17"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: postgresql17 17.2-1 (Sat 21 Dec 2024 22:10:50)
==> Cleaning up...

==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: Scott (scotty)
Password: 
==== AUTHENTICATION COMPLETE ====
Checking keyring... [2/2]
Checking integrity...[2/2]
Loading packages files...[2/2]
Checking file conflicts... [2/2]
Checking available disk space...[2/2]
Installing postgresql17-libs (17.2-1)...[1/2]
Installing postgresql17 (17.2-1)... [2/2]
Running post-transaction hooks...
Creating system user accounts... [1/4]
Creating group 'postgres' with GID 954.
Creating user 'postgres' (PostgreSQL user) with UID 954 and GID 954.
Reloading system manager configuration...[2/4]
Creating temporary files...[3/4]
Arming ConditionNeedsUpdate...[4/4]
Transaction successfully finished.

I assume you have the base-devel & git packages installed on your system? They are required for building many AUR packages.

Edit: I also noticed that your user profile says you are on Stable branch. To use the AUR, it is recommended that users switch to Unstable branch (preferably) or Testing branch, as they are more in line with what is currently in the Arch repos.

The latest stable is 16.3.

Development versions does not count as stable.

AUR buildscripts is entirely unsupported.

1 Like
EINTR 4 Interrupted system call

Looks like a timeout. Too many tasks at once, I/O can not keep up and an error occurs. Reduce the parallel build tasks.

3 Likes