Skip to content

Error installing: "fatal error: cups/cups.h: No such file or directory" #2

Closed
@onel0p3z

Description

@onel0p3z

I'm getting an error while trying to install your package. I have CUPS installed in my system and checked it was correctly installed/working; I even downloaded cups and extracted to the src folder so it was local to the file while compiling when I saw this --> fatal error: cups/cups.h: No such file or directory. I'm attaching the error message that I get. Please advise.
Thank you 👍

onel0p3z@dev-pfb-printing:~$ npm install cupsidity
npm http GET https://registry.npmjs.org/cupsidity
npm http 304 https://registry.npmjs.org/cupsidity

> cupsidity@0.0.2 install /home/onel0p3z/node_modules/cupsidity
> node-gyp rebuild

make: Entering directory `/home/onel0p3z/node_modules/cupsidity/build'
  CXX(target) Release/obj.target/binding/src/binding.o
  CXX(target) Release/obj.target/binding/src/dests.o
../src/dests.cc:10:23: fatal error: cups/cups.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/binding/src/dests.o] Error 1
make: Leaving directory `/home/onel0p3z/node_modules/cupsidity/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.5.0-48-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/onel0p3z/node_modules/cupsidity
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! cupsidity@0.0.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cupsidity@0.0.2 install script.
npm ERR! This is most likely a problem with the cupsidity package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls cupsidity
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.5.0-48-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "cupsidity"
npm ERR! cwd /home/onel0p3z
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/onel0p3z/npm-debug.log
npm ERR! not ok code 0

Activity

molefrog

molefrog commented on Apr 22, 2014

@molefrog
Owner

I suppose you have to install development CUPS package as well. Not sure about that (I'm using OS X), but have you tried to install cups-devel? By the way which linux distribution are you using?

onel0p3z

onel0p3z commented on Apr 22, 2014

@onel0p3z
Author

Ubuntu 12.04, also installed devel package for CUPS but I've had no luck. Where do node-gyp look for *.h one includes when compiling? I tried both copying the file locally to the src folder and also creating links but nothing.

onel0p3z

onel0p3z commented on Apr 22, 2014

@onel0p3z
Author

Ok. I got it working. I downloaded another libcups2-dev.deb and installed manually and it worked. Thank you for your help ✋ ^5

molefrog

molefrog commented on Apr 24, 2014

@molefrog
Owner

By the way, just wondering what do you use it for? I didn't expect that somebody will ever use this package ☺️

onel0p3z

onel0p3z commented on Apr 29, 2014

@onel0p3z
Author

😀 Well by far this module is the only one that comes with native bindings or the only one that actually works and was recently updated. I'm testing in dev env to see how easy can I have a little printing dashboard. I'd like to do a bit more research in order to contribute other methods/functionality. 👍 Thank you for sharing !

michaelschem

michaelschem commented on Jul 14, 2021

@michaelschem
sudo apt install -y libcups2-dev
santiagotri

santiagotri commented on Dec 12, 2023

@santiagotri
sudo apt install -y libcups2-dev

This worked for me, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @onel0p3z@molefrog@michaelschem@santiagotri

        Issue actions

          Error installing: "fatal error: cups/cups.h: No such file or directory" · Issue #2 · molefrog/cupsidity