1

I have just updated to Ubuntu 20.04. The list of options for "Printers" "Choose Driver" "Change Driver" list isn't displaying like it did in Ubuntu 18.04. This displays indefinitely.

enter image description here

I have tried to resolve this without success by adding these 3 repositories:

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse

What I'm expecting is a list of printer manufacturers (including Brother, Canon, HP) and then the ability to select printer models under the manufacturer.

What I'm actually trying to install is HP LaserJet 1012 with driver STP02205.PPD . I am not finding this driver file online. This was on the available list in Ubuntu 18.04.

When I try

sudo  apt-get --reinstall install hplip hplip-gui

and then run

sudo ./hplip-3.20.6.run

the script becomes stuck at:

Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Would you like to retry installing the missing package(s) 

I have already added the repository universe

I am unsure if hplip-3.20.6.run is wanting to use Python 2.7 (Now at end of life) or Python 3.

The script hplip-3.20.6.run ends running with the message:

RE-CHECKING DEPENDENCIES
------------------------
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
error: Installation cannot continue without this dependency.
error: Please manually install this dependency and re-run this installer.

I also wanted to share the results of pip3 search pyqt5. I don't know what I am suppose to be installing.

Additionally I am unable to install optional dependencies:

Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100

Running 'sudo apt-get install --assume-yes python-notify' Please wait, this may take several minutes... error: Package install command failed with error code 100

Running 'sudo apt-get install --assume-yes python-reportlab' Please wait, this may take several minutes... error: Package install command failed with error code 100

What confounds me even more is that I'm receiving these same errors on a fresh install of Ubuntu Studio 20.04. This makes me wonder if hplip-3.20.6.run has been tested and tweaked for use in the latest LTS release of Ubuntu.

I edited my /etc/apt/sources.list with ca.archive.ubuntu.com becoming archive.ubuntu.com .

The command sudo apt-get update && sudo apt-get upgrade did not have any errors when refreshing and no software updates.

This did not make a difference when I reached the DEPENDENCY AND CONFLICT RESOLUTION step in hplip-3.20.6.run

Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100

Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5' Please wait, this may take several minutes... error: Package install command failed with error code 100

Running 'sudo apt-get install --assume-yes python-notify' Please wait, this may take several minutes... error: Package install command failed with error code 100

Running 'sudo apt-get install --assume-yes python-reportlab' Please wait, this may take several minutes... error: Package install command failed with error code 100

The script ended with

RE-CHECKING DEPENDENCIES
------------------------
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
error: Installation cannot continue without this dependency.
error: Please manually install this dependency and re-run this installer.

The reason I used sudo ./hplip-3.20.6.run is on account of the 600+ permissions related errors caused without sudo

Using hp-setup puts me right back at the error I've described above:

rpiggott@rpiggott-Aspire-5742Z:~/Downloads$ hp-setup

Command 'hp-setup' not found, but can be installed with:

sudo apt install hplip

rpiggott@rpiggott-Aspire-5742Z:~/Downloads$ sudo apt install hplip [sudo] password for rpiggott: Reading package lists... Done Building dependency tree
Reading state information... Done hplip is already the newest version (3.20.3+dfsg0-2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Trying to uninstall and re-install left me with the error

Can't open /etc/hp/hplip.conf: No such file or directory.
  • 3
    Does this answer your question? How to install HPLIP on my Ubuntu to support my HP printer and/or scanner? - use sudo apt-get install hplip hplip-gui followed by hp-setup . – N0rbert Jul 07 '20 at 07:29
  • No. I get to 'Missing Dependencies' and it can't get python-pyqt5 to install – Ron Piggott Jul 07 '20 at 12:46
  • Run sudo add-apt-repository universe and retry. – N0rbert Jul 07 '20 at 13:59
  • I already did this step 'universe' distribution component is already enabled for all sources. – Ron Piggott Jul 07 '20 at 14:28
  • I've also tried starting fresh again sudo apt-get --reinstall install hplip hplip-gui – Ron Piggott Jul 07 '20 at 14:30
  • As for me, you have wrong repositories. Please share the output of grep -r ^deb /etc/apt/ --include="*.list" command to the question body or to pastebin. – N0rbert Jul 07 '20 at 15:01
  • this is definitely a bug in ubuntu 20.04,this problem does not exist in previous versions of ubuntu,i wonder if anybody has managed to install a hp printer in 20.04? – trond hansen Jul 07 '20 at 15:03
  • @N0rbert I have amended my question with the repository list – Ron Piggott Jul 07 '20 at 15:05
  • @trondhansen I've just started completing the contact form for hp's developers to inquire if I've come across a Ubuntu 20.04 bug. – Ron Piggott Jul 07 '20 at 15:06
  • I will recommend swicthing to main server using software-properties-gtk or using text editor (change ca.archive.ubuntu.com to archive.ubuntu.com) and then ensure that you do not have any errors while executing sudo apt update . And finally retry HPLIP installation. – N0rbert Jul 07 '20 at 15:09
  • the printer stopped funktioning when i updated from 19.10 to 20.04 – trond hansen Jul 07 '20 at 15:10
  • @N0rbert changing to archive.ubuntu.com followed by sudo apt update and then re-running hplip-3.20.6.run has not resolved the problem. I have updated my question (above) with the output so it is all in one place. – Ron Piggott Jul 07 '20 at 15:28
  • Actually you do not need to run sudo apt-get install hplip hplip-gui and sudo ./hplip-3.20.6.run at the same time. I would recommend to choose deb-package based solution. Simply run hp-setup. – N0rbert Jul 07 '20 at 17:16
  • @N0rbert I updated my post with the results of not using sudo. This puts me right back where I am at with the present error. – Ron Piggott Jul 07 '20 at 17:57
  • I can't understand how and why you got stuck. The simple sudo apt-get install hplip hplip-gui followed by hp-setup should simply work. I do not have HP device and 20.04 LTS near me, but it should work. The binary installer (hplip-3.20.6.run) is not needed at all for such an old device. If it is half installed - remove it by following uninstallation part of this answer. – N0rbert Jul 07 '20 at 18:32
  • @N0rbert This hasn't gone smoothly either. I've updated the question with a link to my pastebin account. – Ron Piggott Jul 07 '20 at 20:16
  • @N0rbert I also get the same error on my fresh install with Ubuntu Studio 20.04 . (What we've been dealing with was as an upgrade from Ubuntu 18.04 to 20.04) I'd have to conclude there is a bug somewhere in hplip that isn't compatible with Ubuntu 20.04 – Ron Piggott Jul 07 '20 at 20:24
  • Amazingly I got it working based on the answer you referenced ( https://askubuntu.com/a/1056078/453336 ) – Ron Piggott Jul 07 '20 at 22:15
  • @trondhansen See my answer (below) of steps that resolved this problem – Ron Piggott Jul 07 '20 at 22:22

1 Answers1

3

The root cause of not being able to install my HP LaserJet 1012 printer was a partial install using the binary and not what is supplied through Ubuntu.

Step 1: Purge existing HP software from the binary

sudo apt-get purge hplip hplip-data hplip-doc hplip-gui hpijs-ppds libsane-hpaio printer-driver-hpcups printer-driver-hpijs

Step 2: Remove directory (if it exists)

sudo rm -rf /usr/share/hplip/

Step 3: Remove packages no longer required

sudo apt-get autoremove

Step 4: Install the HP graphical user interface:

sudo apt-get install hplip-gui

Step 5: With Ubuntu 20.04 graphic interface local HP LIP tool and follow the prompts accordingly to add your HP printer.

This answer is based on a previous Ask Ubuntu post.

  • this did not solve my problem,my printer is HP envy 4520 i can install it with your solution and the printer is detected.everything looks fine until i try to print a page then i get a no comunication error.in ubuntu 16.04-17.04-18.04-19.04 there is no problem and the usb ports are funktioning with every other thing i connect.thank you for your answer but sadly it does not fix the problem in ubuntu 20.04 for me. – trond hansen Jul 08 '20 at 09:30
  • I actually also have an HP Envy Photo 7855 printer. I will try to install it and see how it goes and get back to you. However if there is a problem I did make an inroad with HP Linux developers support. We can reach out to them if needed. Try not to be disheartened. – Ron Piggott Jul 09 '20 at 20:19
  • 1
    there is 7 pages related to printers for 20.04 here on ask and very few have been solved,after having used ubuntu for 11years i have come to expect the possibility to print a few pages a year.it should not be needed for the many printer manufactorers to solve a problem that ubuntu has created(sorry if this sounds like a rant but it is frustrating to have to send all my dokuments to an other pc with a lower version number of ubuntu simply to print a simple dokument) – trond hansen Jul 10 '20 at 05:23
  • How do you connect your printer? USB? Ethernet? Wireless? – Ron Piggott Jul 10 '20 at 21:12
  • i use usb and when i used hplip to install it was installed with usb and detected fine,i even managed to print one page but at the next reboot of my pc the no com problem returned. – trond hansen Jul 11 '20 at 04:20
  • i have now installed the printer HP ENVY 4520 on my wifi network and it is funktioning so far.so for me the solution was to install the printer in wifi mode.i installed it from the menu on the printer so i did not need to touch my pc at all.it does not show in HPLIP menu but it works. – trond hansen Jul 11 '20 at 05:06
  • @trondhansen Then it seems your best course of action is creating a report at: https://launchpad.net/hplip/+addquestion to sort out what has gone wrong. – Ron Piggott Jul 11 '20 at 05:50
  • @trondhansen I am glad you got this sorted. – Ron Piggott Jul 11 '20 at 05:54