Open dave-shawley opened 1 month ago
That's odd. Could you please run this command on the terminal and share the output:
sh -x /Volumes/PostgreSQL 15.8-1/postgresql-15.8-1-osx.app/Contents/MacOS/installbuilder.sh
We are unable to reproduce the issue at our end
@sandeep-edb I figured out the problem. I have /bin/sh
configured as a true Bourne shell instead of bash so it is rejecting the if [ "..." == "..." ]
lines as a syntax error. The correct POSIX sh
syntax is if [ "..." = "..." ]
- note the single =
instead of ==
. You can recreate the issue by using /bin/dash
or changing the /var/select/sh
link to point at dash instead of bash. See man sh
for details ... sorry for the man page reference but I couldn't find a good online reference though googling for "bashism" yields a lot of information.
The simple solution is to change the shebang to use bash instead so #!/usr/bin/env bash
instead of #!/bin/sh
. You can also run something like shellcheck which will point out portability problems.
s1375% sh -x ~/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/installbuilder.sh
+ uname -r
+ os_version=24.0.0
+ uname -p
+ machine_platform=arm
+ uname -m
+ machine_arch=arm64
+ dirname /Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/installbuilder.sh
+ cd /Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS
+ pwd
+ runtimes_dir=/Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS
+ EXTRACT_MODE=0
+ ARGLIST=
+ [ arm64 == x86_64 ]
/Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/installbuilder.sh: 24: [: arm64: unexpected operator
+ [ arm64 == arm64 ]
/Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/installbuilder.sh: 28: [: arm64: unexpected operator
+ executable=none
+ [ -f /Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/ ]
+ [ none == none ]
/Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/installbuilder.sh: 37: [: none: unexpected operator
+ id -u
+ [ == --help -o 0 -eq 1 -o 2145 == 0 ]
/Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/installbuilder.sh: 42: [: unexpected operator
+ dirname /Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/installbuilder.sh
+ /Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/PostgreSQL none --require-admin 1
It was not possible to perform the installation with administrator privileges (status: 4294907265).
Please execute:
sudo /Users/daves/Temporary/postgresql-16.4-1-osx.app/Contents/MacOS/none --mode text
as an alternative to achieve the same effect
Both the postgresql-15.8-1-osx.dmg and postgresql-16.4-1-os.dmg fail to run on my macOS Sequoia (15.0.1) laptop. After opening the application and entering my password to allow system access, the installer simply exits without any feedback.
I traced this down to what appears to be a bug in determining which architecture binary to run (eg,
osx-arm64
orosx-x86_64
). The following is logged in the system log:The interesting message is the one from
security_authtrampoline
I worked around the problem by running
./PostgreSQL osx-arm64 --require-admin 1
from within the .../postgresql-15.8-1.osxapp/Contents/MacOS directory. The installation works so the installer is functional ... for some reason it is not finding the appropriate package to install.