Comments (29)
this means that your cups lib it is in a different place.
what it says if you type cups-config --libs
and cups-config --cflags
?
from node-printer.
$ cups-config --libs
-lcups -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgnutls -L/lib/x86_64-linux-gnu -lgcrypt -lz -lpthread -lm -lcrypt -lz
$ cups-config --cflags
# Above command was empty
from node-printer.
what happens if you run your application with LD_LIBRARY_PATH=/lib/x86_64-linux-gnu node app.js
?
from node-printer.
I getting a same error:
"node_modules/printer/build/Release/node_printer.node: undefined symbol: cupsCreateJob"
I see the -lcups can't effec, I add -v agament parameter and look the output:
"LIBRARY_PATH=/usr/lib/gcc/i686-linux-gnu/4.7/:/usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/:/usr/lib/gcc/i686-linux-gnu/4.7/../../../../lib/:/lib/i386-linux-gnu/:/lib/../lib/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/i686-linux-gnu/4.7/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-D' '_LARGEFILE_SOURCE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'BUILDING_NODE_EXTENSION' '-I' '/home/ssl/.node-gyp/0.10.29/src' '-I' '/home/ssl/.node-gyp/0.10.29/deps/uv/include' '-I' '/home/ssl/.node-gyp/0.10.29/deps/v8/include' '-L/usr/lib/i386-linux-gnu' '-Wall' '-Wextra' '-Wno-unused-parameter' '-pthread' '-m32' '-v' '-O2' '-fno-strict-aliasing' '-fno-tree-vrp' '-fno-tree-sink' '-L/usr/lib/i386-linux-gnu' '-fno-omit-frame-pointer' '-fno-rtti' '-fno-exceptions' '-L/usr/lib/i386-linux-gnu' '-MMD' '-MF' './Release/.deps/Release/obj.target/node_printer/src/node_printer_posix.o.d.raw' '-c' '-o' 'Release/obj.target/node_printer/src/node_printer_posix.o' '-shared-libgcc' '-mtune=generic' '-march=i686'"
no -lcups
from node-printer.
sorry for silly questions:
- did you try the latest repository version?
- did you run from the same user which you build the package?
I updated https://www.npmjs.org/package/printer , maybe you can try to install directly from npmjs.org:
npm uninstall printer
npm install printer
from node-printer.
I am getting something similar: "undefined symbol" error. I am running latest Linux Mint (ubuntu 14.04 based distro)
[6267:0814/132754:INFO:CONSOLE(352)] "Uncaught Error: nw-print-client/node_modules/printer/build/Release/node_printer.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEE", source: module.js (352)
from node-printer.
alevilar: did you compile printer module with nw-gyp? If not. Then this may be the issue.
The issue reported by Multiply seems to be different.
Multiply: could you please reinstall From npmjs.org npm install printer
?
from node-printer.
ok. Do you suggest to open a new issue asking for node webkit compatibility?
I´m now reading about gyp and nw-gyp :) and i continue with error
i did compile, but think I`m having problems when I do:
nw-gyp configure
the script is trying to download node-webkit but with node version..
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp http GET http://node-webkit.s3.amazonaws.com/v0.10.30/nw-headers-v0.10.30.tar.gz
http://node-webkit.s3.amazonaws.com/v0.10.30/nw-headers-v0.10.30.tar.gz
... and fails
2014-08-14 15:54 GMT-03:00 Ion [email protected]:
alevilar: did you compile printer module with nw-gyp? If not. Then this
may be the issue.The issue reported by Multiply seems to be different.
Multiply: could you please reinstall From npmjs.org npm install printer?
—
Reply to this email directly or view it on GitHub
#15 (comment).
from node-printer.
if you run from node-webkit then definetiely you have to compile with nw-gyp and set as target the exact version of node-webkit. Alternatively you can install the exact node version which node-webkit is using and compile with npm directly.
from node-printer.
I tested with node-webkit and is working fine. The only issue you have to build printer package with nw-gyp or with the same version of node which node-webkit uses.
from node-printer.
remove everything and started from scratch....
I am using latest nw version: 0.10.2
while updated to nodejs 0.11.13 so I have the one used by nw.
I am writing the node printer module as a dependency in my project
package:
"dependencies": {
"printer": "latest"
},
and when i write: npm install
the build is made
... but now is failing with this error and is not being installed.
Usage: gyp_main.py [options ...] [build_file ...]gyp_main.py: error: no
such option: --no-parallelgyp ERR! configure error gyp ERR! stack Error:
gyp
failed with exit code: 2
I will continue trying and fighting...
I am newbie with node, nw, gyp, nw-gyp, grunt, glup, and so on.. and I
think the issue is there
:)
2014-08-15 10:40 GMT-03:00 Ion [email protected]:
I tested with node-webkit and is working fine. The only issue you have to
build printer package with nw-gyp or with the same version of node which
node-webkit uses.—
Reply to this email directly or view it on GitHub
#15 (comment).
from node-printer.
seems you have gyp installed.
more details: atom/atom#1981
other links: (google)[https://www.google.co.uk/search?q=%22no+such+option%3A+--no-parallel%22&rlz=1C1CHFX_en-GBGB567GB567&oq=%22no+such+option%3A+--no-parallel%22&aqs=chrome..69i57.1102j0j7&sourceid=chrome&es_sm=122&ie=UTF-8]
from node-printer.
from node-printer.
thanks! i remove gyp command from my ubuntu distro with
apt-get remove gyp
That solved the error i was getting when
npm install printer
Then using nodewebkit 0.10.2 i needed to do this
nw-gyp configure --target=0.10.1, noticed the downgrade of the target.
Thats because latest build 0.10.2 was not found on server.
then
nw-gyp build
And everything was ok
BUT! the issue comes to me:
... Now I am getting this error
"Uncaught Error: ..../node_modules/printer/build/Release/node_printer.node:
undefined symbol: cupsCancelJob", source: module.js (352)
I tried setting LD_LIBRARY_PATH=/lib/x86_64-linux-gnu
..with no luck
2014-08-15 20:30 GMT-03:00 Ion [email protected]:
—
Reply to this email directly or view it on GitHub
#15 (comment).
from node-printer.
Seems cups-dev is not linked.
Did you install libcups2-dev?
I think in your case you have to install apt-get install libcups2-dev
.
After installation rebuild printer
package.
Again, what it says if you type cups-config --libs
and cups-config --cflags
?
from node-printer.
libcups2-dev
http://packages.ubuntu.com/cgi-bin/search_packages.pl?keywords=libcups&searchon=names&subword=1&version=breezy&release=all
is
installed
Here is the output when running both commands:
cups-config --libs
-lcups -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lgnutls -lgcrypt -lz -lpthread -lm -lcrypt -lz
and cups-config --cflags
returns nothing
2014-08-19 5:47 GMT-03:00 Ion [email protected]:
cups-config --libs
from node-printer.
Ok, what happens if you reinstall/recompile and re-run printer
package?
from node-printer.
again:
"Uncaught Error: node_modules/printer/build/Release/node_printer.node:
undefined symbol: cupsCancelJob", source: module.js (352)
there is something I can do to help? for example debugging inside the code?
2014-08-20 17:48 GMT-03:00 Ion [email protected]:
Ok, what happens if you reinstall/recompile and re-run printer package?
—
Reply to this email directly or view it on GitHub
#15 (comment).
from node-printer.
In file binding.gyp instead of <!(cups-config --libs)
put your output -lcups -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgnutls -lgcrypt -lz -lpthread -lm -lcrypt -lz
.
If it doesn't work try to uncomment line #'-lcups -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lz -lpthread -lm -lcrypt -lz'
and comment the line <!(cups-config --libs)
from node-printer.
The error I initially filed an issue for, doesn't seem related to your latest discussion. Would you mind either changing my initial issue, or move to a seperate?
from node-printer.
The issue seems to be the same: cups libs link.
from node-printer.
I had a similar issue and bashed my head against it for about a day. I'm a node noob starting a project to learn it. I'm still refining my "solution" but I'd be glad to help any way I can since I started with the same undefined symbol issue and ended able to list all printers.
What did it for me was adding
"libraries": [
'<!(cups-config --libs)',
]
to the object inside the targets array and rebuilt. I built the app in a docker container and dumped my bash history to text so let me know if there is anything else I can send to help you. I can also do a pull request if that would help you.
from node-printer.
thanks @ezmac for hint.
@alevilar : could you please test @ezmac solution?
from node-printer.
Yes !! It works!!!
Adding into binding.gyp file the libraries key
'targets':{
-
...*
-
"libraries": [
'<!(cups-config --libs)',
]*...
}
now I can list printers !! thanks!
2014-08-25 7:55 GMT-03:00 Ion [email protected]:
thanks @ezmac https://github.com/ezmac for hint.
@alevilar https://github.com/alevilar : could you please test @ezmac
https://github.com/ezmac solution?—
Reply to this email directly or view it on GitHub
#15 (comment).
from node-printer.
Thanks for testing.
from node-printer.
added the change: ba39a38
could you please retest with the latest changes?
Thank you in advance.
from node-printer.
Tested latest version and working,
thanks!!
2014-08-25 13:31 GMT-03:00 Ion [email protected]:
could you please retest with the latest changes?
from node-printer.
Thanks.
from node-printer.
Solved the issue changing the binding.gyp and rebuilding it. Thank you.
from node-printer.
Related Issues (20)
- Docs unclear - do I need Python on target server, or just on dev machine? Other related questions...
- npm install - The module was compiled against a different Node.js version HOT 3
- Unable to install from NPM HOT 11
- Version NodeJS and Electron HOT 1
- npm published package 0.4.0 doesn't include the fix in #292 HOT 1
- invalid ELF header
- printer.js MODULE_NOT_FOUND after compiling project with pkg HOT 1
- jobs doesnt get filled if printer is a shared printer
- How to get response from device? Not job status HOT 1
- can i delete the Build folder?
- Print PDF from URL HOT 3
- Files spooling but never printing
- Cannot find module './node_printer_darwin_x64.node' HOT 3
- Can't print the Image manipulated by Sharp library & converted into base64 & then after buffer! its prints special characters on Images! HOT 2
- Error: StartDocPrinterW error: code: 1804, message: The specified datatype is invalid. HOT 1
- Error: StartDocPrinterW error: code: 1905, message: ...
- alternative to image printing in windows
- Is it possible to use this on an MacBook M2 ( arm64 )? HOT 1
- Cannot find module './node_printer_win32_x64.node'
- Cant install npm install printer. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-printer.