Installation on latest OpenBSD 7.1

Currently have Ghost 4.4.0 running on OpenBSD 7.0. In the 7.1 release node finally was updated from v12, to v16. I am facing a slew of errors when attempting to upgrade, or install a new local copy of the latest ghost. Any help in troubleshooting to get the latest up and running would be super appreciated!

Here is the entire output i get when attempting an install:

$ ghost install local 
☱ Inspecting operating systemhostname: unknown option -- f
usage: hostname [-s] [name-of-host]
Found a development config but not a production config, running in development mode instead

Love open source? We’re hiring Node.js Engineers to work on Ghost full-time.
https://careers.ghost.org/product-engineer-node-js

✔ Checking system Node.js version - found v16.14.2
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✖ Downloading and installing Ghost v4.45.0
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ../../../package.json: No license field
warning ghost@4.45.0: The engine "cli" appears to be invalid.
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.33"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.27.0"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.31"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.34"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.3"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "@tryghost/logging@2.1.5" is incompatible with requested version "@tryghost/logging@2.1.7"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning " > bookshelf@1.2.0" has incorrect peer dependency "knex@>=0.15.0 <0.22.0".
warning Error running install script for optional dependency: "/var/www/ghost/test.com/versions/4.45.0/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
Arguments: 
Directory: /var/www/ghost/test.com/versions/4.45.0/node_modules/sharp
Output:
sharp: Installation error: BSD/SunOS systems require manual installation of libvips >= 8.12.2
sharp: Please see LINK for required dependencies"
error /var/www/ghost/test.com/versions/4.45.0/node_modules/re2: Command failed.
Exit code: 1
Command: install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR --skip-path-var RE2_DOWNLOAD_SKIP_PATH --skip-ver-var RE2_DOWNLOAD_SKIP_VER || npm run rebuild
Arguments: 
Directory: /var/www/ghost/test.com/versions/4.45.0/node_modules/re2
Output:
Trying LINK/openbsd-x64-93.br ...
Trying LINK/openbsd-x64-93.gz ...
Building locally ...

> re2@1.17.4 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.14.2 | openbsd | x64
gyp info find Python using Python version 3.9.12 found at "/usr/local/bin/python3"
gyp info spawn /usr/local/bin/python3
gyp info spawn args [
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/.cache/node-gyp/16.14.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/var/www/ghost/.cache/node-gyp/16.14.2',
gyp info spawn args   '-Dnode_gyp_dir=/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/var/www/ghost/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/var/www/ghost/test.com/versions/4.45.0/node_modules/re2',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gypgmake: Entering directory '/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/build'
 info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/re2/lib/addon.o
gmake: g++: No such file or directory
gmake: *** [re2.target.mk:168: Release/obj.target/re2/lib/addon.o] Error 127
gmake: Leaving directory '/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System OpenBSD 7.1
gyp ERR! command "/usr/local/bin/node" "/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/ghost/test.com/versions/4.45.0/node_modules/re2
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok 
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "1".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

> re2@1.17.4 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.14.2 | openbsd | x64
gyp info find Python using Python version 3.9.12 found at "/usr/local/bin/python3"
gyp info spawn /usr/local/bin/python3
gyp info spawn args [
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/.cache/node-gyp/16.14.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/var/www/ghost/.cache/node-gyp/16.14.2',
gyp info spawn args   '-Dnode_gyp_dir=/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/var/www/ghost/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/var/www/ghost/test.com/versions/4.45.0/node_modules/re2',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn gmake
gyp info spawn argsgmake: Entering directory '/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/build'
 [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/re2/lib/addon.o
gmake: g++: No such file or directory
gmake: *** [re2.target.mk:168: Release/obj.target/re2/lib/addon.o] Error 127
gmake: Leaving directory '/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System OpenBSD 7.1
gyp ERR! command "/usr/local/bin/node" "/var/www/ghost/test.com/versions/4.45.0/node_modules/re2/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/ghost/test.com/versions/4.45.0/node_modules/re2
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
warning Error running install script for optional dependency: "/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.9
node-pre-gyp info using node@16.14.2 | openbsd | x64
node-pre-gyp info check checked for \"/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/lib/binding/napi-v6-openbsd-unknown-x64/node_sqlite3.node\" (not found)
node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.0.5/napi-v6-openbsd-unknown-x64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on LINK/napi-v6-openbsd-unknown-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not installable for sqlite3@5.0.5 and node@16.14.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error response status 404 Not Found on LINK/napi-v6-openbsd-unknown-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.14.2 | openbsd | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.14.2 | openbsd | x64
gyp info find Python using Python version 3.9.12 found at \"/usr/local/bin/python3\"
gyp info spawn /usr/local/bin/python3
gyp info spawn args [
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/www/ghost/.cache/node-gyp/16.14.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/var/www/ghost/.cache/node-gyp/16.14.2',
gyp info spawn args   '-Dnode_gyp_dir=/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/var/www/ghost/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.14.2 | openbsd | x64
gyp info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gmake: Entering directory '/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/build'
  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
  AR(target) Release/obj.target/../node-addon-api/nothing.a
  COPY Release/nothing.a
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3380200/sqlite3.c
  TOUCH Release/obj.target/deps/action_before_build.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3380200/sqlite3.o
  AR(target) Release/obj.target/deps/sqlite3.a
  COPY Release/sqlite3.a
  CXX(target) Release/obj.target/node_sqlite3/src/backup.o
gmake: g++: No such file or directory
gmake: *** [node_sqlite3.target.mk:138: Release/obj.target/node_sqlite3/src/backup.o] Error 127
gmake: Leaving directory '/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System OpenBSD 7.1
gyp ERR! command \"/usr/local/bin/node\" \"/var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/lib/binding/napi-v6-openbsd-unknown-x64/node_sqlite3.node\" \"--module_name=node_sqlite3\" \"--module_path=/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/lib/binding/napi-v6-openbsd-unknown-x64\" \"--napi_version=8\" \"--node_abi_napi=napi\" \"--napi_build_version=6\" \"--node_napi_label=napi-v6\"
gyp ERR! cwd /var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/lib/binding/napi-v6-openbsd-unknown-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/lib/binding/napi-v6-openbsd-unknown-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/www/ghost/test.com/versions/4.45.0/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System OpenBSD 7.1
node-pre-gyp ERR! command \"/usr/local/bin/node\" \"/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3
node-pre-gyp ERR! node -v v16.14.2
node-pre-gyp ERR! node-pre-gyp -v v1.0.9
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /var/www/ghost/test.com/versions/4.45.0/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/lib/binding/napi-v6-openbsd-unknown-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/ghost/test.com/versions/4.45.0/node_modules/sqlite3/lib/binding/napi-v6-openbsd-unknown-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)"

yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.2: The platform "openbsd" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info This module is OPTIONAL, you can safely ignore this error
info Visit LINK for documentation about this command.
info This module is OPTIONAL, you can safely ignore this error

Exit code: 1


Debug Information:
    OS: , v
    Node Version: v16.14.2
    Ghost-CLI Version: 1.19.3
    Environment: development
    Command: 'ghost install local'

Additional log info available in: /var/www/ghost/.ghost/logs/ghost-cli-debug-2022-04-23T01_32_12_313Z.log

Try running ghost doctor to check your system for known issues.

You don’t seem to have a suitable build toolchain installed that is needed for the native dependencies