Zorin Forum

Unable to Print To an HP Laserjet

It says hplip-gui command does not exist.

sudo apt install -y hplip hplip-gui
[sudo] password for raymond:
Reading package lists... Done
Building dependency tree
Reading state information... Done
hplip is already the newest version (3.20.3+dfsg0-2).
hplip set to manually installed.
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra dctrl-tools dkms fonts-wine glib-networking:i386 gstreamer1.0-plugins-base:i386 gstreamer1.0-plugins-good:i386 gstreamer1.0-vaapi
gstreamer1.0-x:i386 heif-gdk-pixbuf intel-media-va-driver:i386 libaa1:i386 libaom0:i386 libapparmor1:i386 libasn1-8-heimdal:i386 libasound2:i386 libasound2-plugins:i386
libasyncns0:i386 libatomic1:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libavc1394-0:i386 libavcodec58:i386 libavutil56:i386
libbrotli1:i386 libbsd0:i386 libcaca0:i386 libcairo-gobject2:i386 libcairo2:i386 libcap2:i386 libcdparanoia0:i386 libcmis-0.5-5v5 libcodec2-0.9:i386 libcups2:i386
libcurl3-gnutls:i386 libdatrie1:i386 libdbus-1-3:i386 libdbusmenu-qt5-2 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386
libdv4:i386 libedit2:i386 libelf1:i386 libexif12:i386 libexpat1:i386 libfaudio0 libfaudio0:i386 libffi7:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386
libfribidi0:i386 libgd3:i386 libgdbm-compat4:i386 libgdbm6:i386 libgdk-pixbuf2.0-0:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386 libglib2.0-0:i386 libglx-mesa0:i386
libgmp10:i386 libgnutls30:i386 libgomp1:i386 libgpgmepp6 libgphoto2-6:i386 libgphoto2-port12:i386 libgraphite2-3:i386 libgsm1:i386 libgsoap-2.8.91 libgssapi-krb5-2:i386
libgssapi3-heimdal:i386 libgstreamer-plugins-base1.0-0:i386 libgstreamer-plugins-good1.0-0:i386 libgstreamer1.0-0:i386 libgudev-1.0-0:i386 libharfbuzz0b:i386
libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386 libhogweed5:i386 libhx509-5-heimdal:i386 libicu66:i386 libiec61883-0:i386 libieee1284-3:i386
libigdgmm11:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-26-heimdal:i386 libkrb5-3:i386
libkrb5support0:i386 liblcms2-2:i386 libldap-2.4-2:i386 libllvm12:i386 libltdl7:i386 liblzf1 libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6
libminizip1 libmp3lame0:i386 libmpg123-0:i386 libmysqlclient21:i386 libnettle7:i386 libnghttp2-14:i386 libnuma1:i386 libodbc1 libodbc1:i386 libogg0:i386
libopenjp2-7:i386 libopus0:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpango-1.0-0:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpcap0.8:i386 libpci3:i386
libpciaccess0:i386 libperl5.30:i386 libpixman-1-0:i386 libpng16-16:i386 libproxy1v5:i386 libpsl5:i386 libpulse0:i386 libqrcodegencpp1 libraw1394-11:i386 librlottie0-1
libroken18-heimdal:i386 librsvg2-2:i386 librsvg2-common:i386 librtmp1:i386 libsamplerate0:i386 libsane:i386 libsasl2-2:i386 libsasl2-modules-db:i386 libsdl2-2.0-0:i386
libsensors5:i386 libshine3:i386 libshout3:i386 libslang2:i386 libsnappy1v5:i386 libsndfile1:i386 libsnmp35:i386 libsoup2.4-1:i386 libsoxr0:i386 libspeex1:i386
libsqlite3-0:i386 libssh-4:i386 libssl1.1:i386 libstb0 libstb0:i386 libstdc++6:i386 libswresample3:i386 libtag1v5:i386 libtag1v5-vanilla:i386 libtasn1-6:i386
libthai0:i386 libtheora0:i386 libtiff5:i386 libtwolame0:i386 libusb-1.0-0:i386 libv4l-0:i386 libv4lconvert0:i386 libva-drm2:i386 libva-wayland2 libva-x11-2:i386
libva2:i386 libvdpau1:i386 libvisual-0.4-0:i386 libvorbis0a:i386 libvorbisenc2:i386 libvpx6:i386 libvulkan1:i386 libwavpack1:i386 libwayland-client0:i386
libwayland-cursor0:i386 libwayland-egl1:i386 libwebp6:i386 libwebpmux3:i386 libwind0-heimdal:i386 libwrap0:i386 libx11-6:i386 libx11-xcb1:i386 libx264-155:i386
libx265-179:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-record0 libxcb-render0:i386 libxcb-screensaver0
libxcb-shm0:i386 libxcb-sync1:i386 libxcb-xfixes0:i386 libxcb1:i386 libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386
libxinerama1:i386 libxkbcommon0:i386 libxml2:i386 libxpm4:i386 libxrandr2:i386 libxrender1:i386 libxshmfence1:i386 libxss1:i386 libxv1:i386 libxvidcore4:i386
libxxf86vm1:i386 libxxhash0 libzvbi0:i386 ocl-icd-libopencl1:i386 zorin-os-feedback
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed
0 to upgrade, 1 to newly install, 0 to remove and 2 not to upgrade.
Need to get 19.1 kB of archives.
After this operation, 156 kB of additional disk space will be used.
Get:1 Index of /ubuntu focal/universe amd64 hplip-gui all 3.20.3+dfsg0-2 [19.1 kB]
Fetched 19.1 kB in 0s (301 kB/s)
Selecting previously unselected package hplip-gui.
(Reading database ... 327333 files and directories currently installed.)
Preparing to unpack .../hplip-gui_3.20.3+dfsg0-2_all.deb ...
Unpacking hplip-gui (3.20.3+dfsg0-2) ...
Setting up hplip-gui (3.20.3+dfsg0-2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
raymond@RTB:~$ hplip-gui
hplip-gui: command not found

I try to be helpful...
This can happen when the village idiot (me) is eager, but ignorant. I do not use an HP Printer, so I am out of my element on this one...

You can run sudo apt clean && sudo apt autoremove to get rid of some of that clutter if you like.
The following portion states you have hplip-gui installed...

hplip --gui


hp-setup --gui

I am getting this error when running hplip-3.22.2 again :-
Gtk-Message: 16:14:27.070: Failed to load module "canberra-gtk-module"

Can I do the following without any risks of causing other issues for other software.

sudo apt install libcanberrra-gtk*

That's no problem. You can run

sudo apt install libcanberra-gtk-module

I did this and a number of tried twice with the hplip setup script. The hplip make works OK but when I get to setting up the printer I get all sorts of errors depending on why route I take either the gui or command line.
Using command line I get :-

error: Channel write error

error: Channel write error error: Channel write error error: Device is busy or in an error state. Please check device and try again.

I have done a search on this and cant find anything. I know that USB cable is fine and also the printer as I have been able to print via my Windows VM on VirtualBox.

I think we have two threads facing the same issue:

Sometimes, the HP Printer must be hard reset prior to installing the driver. The infamous, did you turn it off then back on again?

This can happen because the printer programmer is quite simple and during setup, gets it into its head that it has a filled queue.

Another thing that can happen, is in multiple attempts to install the drivers, the system gets confused about the configuration. The remedy is to completely remove the drivers, then install fresh and in one attempt:

I have started going through the askubuntu article and have come to the python part trying to ascertain which python version I am running. It says command python not found.

Does HLPLIP still use Python?

Yes, it does. In terminal, can you run

python --version

I had to use python3 as the command.
Maybe this is because of what I did with the
python --version

Command 'python' not found, did you mean:

command 'python3' from deb python3
command 'python' from deb python-is-python3

raymond@RTB:~$ python3 --version
Python 3.8.10

Is this right?

1 Like

I am still getting systray issue after rebooting and Channel errors so it cant communicate with the printer. I have tried printing a test page. hp-check comes up clean except the channel errors.

I was thinking that we should close this issue and start a new one. What do you think??

I may be wrong, but it looks like the same underlying issue needs to be addressed.

Where did you see the mdns_lookup error message? I have not seen this since I had installed network-snmp package and reinstalled hplip. I have only got these errors
Output from Terminal
HP Linux Imaging and Printing System (ver. 3.22.2)

HP Device Manager ver. 15.0

Copyright (c) 2001-18 HP Development Company, LP

This software comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to distribute it

under certain conditions. See COPYING file for more details.

/usr/share/hplip/ui5/devmgr_ext.py:15: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if self.latest_available_version is not "":

/usr/share/hplip/ui5/devmgr_ext.py:37: SyntaxWarning: "is not" with a literal. Did you mean "!="?

if self.latest_available_version is not "":

-error: Channel write error

error: Channel write error

error: Channel write error

error: Channel write error

error: Channel write error

error: Channel write error

error: Unable to communicate with printer LaserJet. Please check the printer and try again.

error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_MFP_M28-M31?serial=VNC6T15036

error: Device not found

error: Communication status: Failed

I think the second post - but quoted it as it is a python import error.

I think I am going to throw the towel in on all the open issues for the HLPLIP install, setup and customisation. Could I just use cups to print on this HP printer. I dont need any other functionality support. I can always use the Windows VM for scanning as an example.

I had no idea you had not tried CUPS already... I suppose I assumed.

I dont know how to use CUPS but I will find out!

In most cases HP printers which are supported (and yours is) start working as soon as you connect it in the network...It sets-up the printer the first time and within a few minutes it is good to go.

1 Like

Thanks. You are right. It seems my printer is supported without HPLIP. I just need to get used to how native Linux handles printing.

1 Like

Just visited the official HPLIP website and found this:

HPLIP 3.21.10 - This release has the following changes:

Added support for following new Distro's:

Ubuntu 21.10
Debian 11
Zorin 15
Zorin 16

Current release is version 3.22.2

Whilst your printer element might be working, what is the situation with the Scanner element? Does Document Scanner work? If not you may need to install the HPLIP current package to get it to work.

In respect of any printer, open a terminal and enter:

sudo system-config-printer

Then when the interface opens, add printer and when it starts for options, choose Network Printer and then use the Appsocket/HPJetDirect option - for the Host - enter the IP address of your router. Next search for manufacturer, then choose the model - if it is not present, check the cartridges for the printer as to what model/s they work with and enter the nearest named model listed that the cartridges work for.

I decided to not use HLPLIP and just use the native support. I am using a Windows VM running the whole HP Software package for when I need to scan etc.