Debugging pliigo-cups-agent on ubuntu

When trying to install pliigo cups agent on ubuntu via npm (sudo npm install pliigo-cups-agent -g), you may run into an issue like the following:

cups-config: not found

if an error happens and it looks like this:


/usr/local/bin/pliigo-cups-agent -> /usr/local/lib/node_modules/pliigo-cups-agent/bin/pliigo-cups-agent

> printer@0.2.2 install /usr/local/lib/node_modules/pliigo-cups-agent/node_modules/printer
> node-gyp rebuild

/bin/sh: 1: cups-config: not found
gyp: Call to 'cups-config --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.8.0-36-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/pliigo-cups-agent/node_modules/printer
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
??? (empty)

npm ERR! Linux 4.8.0-36-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "pliigo-cups-agent" "-g"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2

npm ERR! printer@0.2.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the printer@0.2.2 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the printer 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 information on how to open an issue for this project with:
npm ERR!     npm bugs printer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls printer
npm ERR! There is likely additional logging output above.

try running the cups-config command and see what it returns, if it is something like:

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jon/Development/printer/npm-debug.log
npm ERR! code 1
The program 'cups-config' is currently not installed. You can install it by typing:
sudo apt install libcups2-dev

Do what it says and run:

sudo apt install libcups2-dev

this will install our cups lib, now running that same command should return the usage documentation for that script. Try to install our npm module again and it should now work!


Innovative, entrepreneurial and positively unsatisfied mind that constantly pushes the tech boundaries to create new solutions and devices that change people’s lives. Throughout my career, I have had the opportunity of having a multi-disciplinary experience, which led me to wear the hats of: Architect, IoT Consultant (Internet of Things Consultant), Developer, Designer, Engineer, Server Admin, Consultant and Project Manager – to name a few. Based on this diversified background, I get projects done by following smart ideas and well-planned goals. In a world which is getting more unconventional by the day, I use unconventional ways, and a very healthy dose of integrity, to create devices and solutions that help companies go from a steady present to a dynamic future.

You may also like...