Git Product home page Git Product logo

Comments (5)

sasha-alias avatar sasha-alias commented on May 29, 2024

The error means it failed to import libpq driver which is C-compiled so depends on platform architecture. Do you have 32bit or 64bit version of Ubuntu? The available build is only for x64

from sqltabs.

marwan-nwh avatar marwan-nwh commented on May 29, 2024

64bit

sudo apt-get install libpq-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libpq-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-63 linux-headers-3.13.0-63-generic
  linux-image-3.13.0-63-generic linux-image-extra-3.13.0-63-generic
  python-wicd wicd-daemon
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

from sqltabs.

sasha-alias avatar sasha-alias commented on May 29, 2024

Something went wrong during compilation of libpq binding.
Check the electron version you have, should be 0.27.3:

$ electron --version
[2769:1229/143739:ERROR:browser_main_loop.cc(173)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
v0.27.3

If version is OK try to recompile libpq binding:

rm -rf node_modules/libpq/
export npm_config_disturl=https://atom.io/download/atom-shell
export npm_config_target=0.27.3
export npm_config_arch=x64
export npm_config_runtime=electron
npm install git+https://github.com/sasha-alias/node-libpq.git

Expected output would be smth like:

npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/bindings/1.2.1
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings/1.2.1

> [email protected] install /home/alp/sqltabs/node_modules/libpq
> node-gyp rebuild

make: Entering directory `/home/alp/sqltabs/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
  SOLINK_MODULE(target) Release/obj.target/addon.node
  SOLINK_MODULE(target) Release/obj.target/addon.node: Finished
  COPY Release/addon.node
make: Leaving directory `/home/alp/sqltabs/node_modules/libpq/build'
npm WARN unmet dependency /home/alp/sqltabs/node_modules/c3 requires d3@'<=3.5.0' but will load
npm WARN unmet dependency /home/alp/sqltabs/node_modules/d3,
npm WARN unmet dependency which is version 3.5.12
[email protected] node_modules/libpq
├── [email protected]
└── [email protected]

If the compilation fails ensure you have picked by your shell the environment variables npm_config_disturl, npm_config_target, npm_config_arch, npm_config_runtime.
just echo them:

$ echo $npm_config_target 
0.27.3

Also ensure you have pg_config from libpq-dev package installed and accessible in your PATH:

$ pg_config --version
PostgreSQL 9.3.10

from sqltabs.

marwan-nwh avatar marwan-nwh commented on May 29, 2024

it worked, i don't know what was wrong
i did libpq recompiling, and used bash instead of fish

thanks, great app

from sqltabs.

sasha-alias avatar sasha-alias commented on May 29, 2024

fish has a different way of setting environment variables, it's not fully bash compatible so instead of
export you should use set command.

from sqltabs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.