This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Error when trying to install on Graviton EC2 #122
Comments
I'm not sure this will compile on anything past node 18 LTS yet. I have
plans to upgrade the NAN references as needed to fix compilation under node
… 18 coming up in the next month or two.
On Fri, Mar 22, 2024 at 9:37 AM Neha Rathi ***@***.***> wrote:
HI,
I have a c7g EC2 running Linux. I keep getting this error when trying to
install pg-native:
***@***.***/node_modules/libpq: Running install script, failed in 3.5s
...***@***.***/node_modules/libpq install$ node-gyp rebuild
│ gyp info it worked if it ends with ok
│ gyp info using ***@***.***
│ gyp info using ***@***.*** | linux | arm64
│ gyp info find Python using Python version 3.9.16 found at "/usr/bin/python3"
│ gyp info spawn /usr/bin/python3
│ gyp info spawn args [
│ gyp info spawn args '/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/pnpm/dist/node_modul
│ 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 ***@***.***/node_modules/libpq/build/config.
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/pnpm/dist/node_modul
│ gyp info spawn args '-I',
│ gyp info spawn args '/home/ec2-user/.cache/node-gyp/19.9.0/include/node/common.gypi',
│ gyp info spawn args '-Dlibrary=shared_library',
│ gyp info spawn args '-Dvisibility=default',
│ gyp info spawn args '-Dnode_root_dir=/home/ec2-user/.cache/node-gyp/19.9.0',
│ gyp info spawn args '-Dnode_gyp_dir=/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/pnpm/
│ gyp info spawn args '-Dnode_lib_file=/home/ec2-user/.cache/node-gyp/19.9.0/<(target_arch)/node.lib',
│ gyp info spawn args ***@***.***/node_modules/l
│ 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 make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ make: Entering directory ***@***.***/node_modules/libpq/build'
│ CXX(target) Release/obj.target/addon/src/connection.o
│ CXX(target) Release/obj.target/addon/src/connect-async-worker.o
│ CXX(target) Release/obj.target/addon/src/addon.o
│ In file included from ..***@***.***/node_modules/nan/nan.h:62,
│ from ../src/addon.h:4,
│ from ../src/addon.cc:1:
│ /home/ec2-user/.cache/node-gyp/19.9.0/include/node/node.h:1169:7: warning: cast between incompatible f
│ 1169 | (node::addon_register_func) (regfunc), \
│ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ /home/ec2-user/.cache/node-gyp/19.9.0/include/node/node.h:1203:3: note: in expansion of macro ‘NODE_MO
│ 1203 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
│ | ^~~~~~~~~~~~~
│ ../src/addon.cc:76:1: note: in expansion of macro ‘NODE_MODULE’
│ 76 | NODE_MODULE(addon, InitAddon)
│ | ^~~~~~~~~~~
│ SOLINK_MODULE(target) Release/obj.target/addon.node
│ /usr/bin/ld: cannot open linker script file /builddir/build/BUILD/postgresql-15.0/.package_note-libpq-
│ collect2: error: ld returned 1 exit status
│ make: *** [addon.target.mk:160: Release/obj.target/addon.node] Error 1
│ make: Leaving directory ***@***.***/node_modules/libpq/build'
│ gyp ERR! build error
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack at ChildProcess.onExit (/home/ec2-user/.nvm/versions/node/v19.9.0/lib/node_modules/
│ gyp ERR! stack at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
│ gyp ERR! System Linux 6.1.79-99.164.amzn2023.aarch64
│ gyp ERR! command "/home/ec2-user/.nvm/versions/node/v19.9.0/bin/node" "/home/ec2-user/.nvm/versions/no
│ gyp ERR! cwd ***@***.***/node_modules/libpq
│ gyp ERR! node -v v19.9.0
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok
—
Reply to this email directly, view it on GitHub
<#122>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMHIIGPJHNOE5E2T5BZKLYZQ62TAVCNFSM6AAAAABFDOIZKCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYDENRVGAZDGNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thank you for the quick reply! I still have the same problem :(
|
hmmm...you might be missing some system libraries? Looks like its not linking properly....have you checked out this? |
You might wanna try this as well: |
I did the steps in your first comment (yum install, checking pg_config is defined). Regarding your second comment:
^ I have ARM architecture, not x86. Is that a deal breaker? |
Is there a way to remove the pg config and start over?
|
Then I re-installed, but it didn't change anything |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
HI,
I have a c7g EC2 running Linux. Postgres 15, Node 19. I keep getting this error when trying to install
pg-native
:Other info:
The text was updated successfully, but these errors were encountered: