ardaniel has asked for the wisdom of the Perl Monks concerning the following question:

I have an HP 7855 printer that I am trying to print to. tried installing the Net::CUPS module but evidently I have the wrong CUPS version installed. What can I do?

This is the error I get when trying to install Net::CUPS-> Configuring N/NI/NINE/Net-CUPS-0.64.tar.gz with Makefile.PL Net::CUPS Configuration Running cups-config ... failed. Net::CUPS requires the Common Unix Printing System. Check your system configuration and then attempt the configure process again. No 'Makefile' created NINE/Net-CUPS-0.64.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK

Replies are listed 'Best First'.
Re: Perl printing to HP 7855
by kcott (Archbishop) on Apr 15, 2023 at 23:39 UTC

    G'day ardaniel,

    Welcome to the Monastery.

    [For future reference: Please put warning & error messages (as well as code and data) within <code>...</code> tags. This makes it easier to read and has some additional benefits, such as handling special characters. Thankyou.]

    I didn't have Net::CUPS installed either; attempting to install resulted in the same error you've reported.

    I don't actually want that module; however, here's the procedure to follow for this, and other modules, which require 3rd-party resources.

    1. Go to the CPAN page for the module: Net::CUPS
    2. At the top of the page you'll see
      "{author-link} / {distribution-link} / {module-name}".
      In this instance, {distribution-link} is Net-CUPS-0.64; follow that link.
    3. You're now at the distribution page. You'll see a number of links to various files: you're looking for either INSTALL or README. If both are present, you may need to read both of them. In this case, there's no INSTALL; so follow the README link.
    4. About halfway down you'll see DEPENDENCIES. This is a common section in README files with information about libraries, and so on, you may need to install. For Net::CUPS, it's pointing you to http://www.cups.org.
    5. You'll need to find downloads appropriate for your operating system. In general, aim to get the most recent. Not knowing what OS you're using; I'll leave you to work out the rest yourself.

    — Ken

Re: Perl printing to HP 7855
by hippo (Archbishop) on Apr 17, 2023 at 09:04 UTC
    evidently I have the wrong CUPS version installed

    I think it is more likely that you don't have cups-config installed, or it isn't in your PATH or you don't have the requisite privileges to run it. What is the output when you run

    cups-config --version

    which is what Makefile.PL uses to determine the version?


    🦛

Re: Perl printing to HP 7855
by ardaniel (Initiate) on Apr 18, 2023 at 19:48 UTC

    I ran the command cups-config --version

    This is the result
    Command 'cups-config' not found, but can be installed with: sudo apt install libcups2-dev

    After installing the libcups2-dev I was able to install Net::CUPS and create a test file to print a file to the printer. Thanks hippo!