NickNaso / ghostscript4js

Ghostscript4JS binds the Ghostscript C API to the Node.JS world.
http://www.nacios.it
Apache License 2.0
68 stars 19 forks source link

node-gyp rebuild failed #44

Closed crapthings closed 5 years ago

crapthings commented 5 years ago

osx brew install ghostscript node 8.16

GS4JS_HOME=/usr/local/lib

node-gyp rebuild

  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
  CXX(target) Release/obj.target/ghostscript4js/src/ghostscript4js.o
  SOLINK_MODULE(target) Release/ghostscript4js.node
clang: error: no such file or directory: '/usr/local/lib/libgs.dylib'
NickNaso commented 5 years ago

Hi @crapthings, you get linker error because in your system seems that libgs.dylib is not installe din the default path for macOS system. I saw that you installed ghostscript through brew so you have the library that you need at path similar to this: /usr/local/Cellar/ghostscript/<FOLDER THAT REPRESENT THE INSTALLED VERSION>/lib. Example: /usr/local/Cellar/ghostscript/9.26_1/lib Now the only thing that you have to do if the libgs.dylib is in this folder is to go in the folder /usr/local/lib and create a symbolic link to your library using the following command: ln -s ../Cellar/ghostscript/<FOLDER THAT REPRESENT THE INSTALLED VERSION>/lib/libgs.dylib Example: ../Cellar/ghostscript/9.26_1/lib/libgs.dylib Hope that this help you.

shellscape commented 8 months ago

Note that on Apple Silicon (M1, M2, M3) Homebrew has changed the install directory to /opt/homebrew/Cellar/