hp-plugin says python-gobject not installed (but it is!)

Bug #1813768 reported by Aleksey Tsalolikhin
40
This bug affects 9 people
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

I've just upgraded from Ubuntu 16 LTS to 18 LTS and now I can't print or scan.

I've tried re-installing the HPLIP and plug-in but the plug-in won't go in:

    error: Python gobject/dbus may be not installed

It IS installed though:

atsaloli@tashkent:~/Downloads$ dpkg -l |grep python-gobject
ii python-gobject 3.26.1-2 all Python 2.x bindings for GObject - transitional package
ii python-gobject-2 2.28.6-12ubuntu3 amd64 deprecated static Python bindings for the GObject library
atsaloli@tashkent:~/Downloads$

Here is the screen log:

Downloading plug-in from: file:///home/atsaloli/Downloads/hplip-3.19.1-plugin.run
1100%Receiving digital keys: /usr/bin/gpg --homedir /home/atsaloli/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.19.1 Plugin Self Extracting Archive..............................................................

HP Linux Imaging and Printing System (ver. 3.19.1)
Plugin Installer ver. 3.0

Copyright (c) 2001-15 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.

Plug-in version: 3.19.1
Installed HPLIP version: 3.19.1
Number of files to install: 64

Plugin installation failed
error: Python gobject/dbus may be not installed
error: Plug-in install failed.

Done.
atsaloli@tashkent:~/Downloads$

Revision history for this message
brian_p (claremont102) wrote :

Also

https://forums.linuxmint.com/viewtopic.php?f=51&t=286810

If your intention is to test hplip-3.19.1, that is fine. OTOH, 18 LTS has packages.

--
Brian.

Revision history for this message
Aleksey Tsalolikhin (atsaloli-tech) wrote :

Thanks, Brian! Yeah, I ended up using the hplip packages from 18 LTS.

Since HP requires their proprietary plugin and didn't have plugin version 3.17.10 available for download (matching 3.17.10 which ships with 18 LTS) but had 3.17.11 as the oldest version, I downloaded and renamed 3.17.11 plugin to 3.17.10 and then HP's "hp-plugin" installer was able to find it. I can print now.

Revision history for this message
brian_p (claremont102) wrote :

> ....I downloaded and renamed 3.17.11 plugin to 3.17.10

Sneaky! I must remember that one. Glad you got things sorted.

--
Brian.

Revision history for this message
Aleksey Tsalolikhin (atsaloli-tech) wrote :

Thanks, Brian! I appreciate your help very much. :)

Revision history for this message
berend (berenddeboer) wrote :

Did you install apparmor when asked? I think that's where the problem is. Try disabling the apparmor profile: aa-disable /usr/share/hplip/plugin.py

Revision history for this message
Jander Moreira (moreira-jander) wrote :

Berend,

After disabling the apparmor profile the plugin successfully installs, but when adding a printer, hp-setup complains that a binary plugin is still needed.

I'm trying to get 3.19.3 working in Ubuntu 18.04.

Revision history for this message
Traxpoint (traxpoint) wrote :

Hi
After adding the gpg-key manually I installed apparmor-utils and then disable the profile like described above.
Now it works with HPLIB 3.19.3

Revision history for this message
Ra (raffamaiden) wrote :

Install apparmor utils

sudo apt-get install apparmor-utils

Run

sudo aa-disable /usr/share/hplip/plugin.py

Run as normal user, not as root:

hplip-plgin

now the printer will get installed

Revision history for this message
peacecop kalmer: (peacecop-kalmer) wrote :

The last suggestion didn't change anything better. And there's no command hplip-plgin nor hplip-plugin, it's hp-plugin which keeps complaining about the missing key.

Revision history for this message
smurf (luca-dgh) wrote :

Thank you so much Ra, that worked for me with hplip 3.19.6

Revision history for this message
Cem Unden (undencem) wrote :

Thanks. I have been dealing with this problem for 3 days. This share helped me solve it .

Revision history for this message
G S Bajaj (gs-bajaj) wrote :

@peacecop the command for me was `hp-plugin`, maybe you can try that.

Revision history for this message
haruo22 (ajorpiang) wrote :

Having worked around for three days, finally I have figured out where the problem lay and I understood Brian's comment. Thank you!!

Ubuntu 18.04 comes with 3-17-10. I was trying to install the latest version 3-19-12. I downloaded hplip-3.17.10.run from
https://sourceforge.net/projects/hplip/files/hplip/
and installed hplip-3.17.10-plugin.run during the installation process, which I downloaded beforehand from
https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/

Now HP LaserJet P1102w works fine with Ubuntu 18.04.

Revision history for this message
rafkid (neilliz) wrote :

After Ra in Answer #8 with minor changes the below worked in Kubuntu 19.1

Install apparmor utils

sudo apt-get install apparmor-utils

Run

sudo aa-disable /usr/share/hplip/plugin.py

Run as normal user, not as root:

hp-plugin

now the printer will get installed

Revision history for this message
Gergő Nagy (ngergoistvan) wrote :

I tried many workaround including these mentioned above.
I installed 19.10. yesterday though 3.19.12 just didn't work.
I installed 3.17.10 eventually.

Revision history for this message
James Edmunds (jam9856) wrote :

Ubuntu 16.04 . HPLIP 3.20.5

Answer 14 worked for me .

Install apparmor utils

sudo apt-get install apparmor-utils

Run

sudo aa-disable /usr/share/hplip/plugin.py

Run as normal user, not as root:

hp-plugin

now the printer will get installed

Revision history for this message
Richard Westcott (rjwiii) wrote :

Ubuntu 18.04 latest updates ... the above work around is not working for me. I get:

--------------------------------------------------------------
rjwiii@athiest-geek:~$ sudo apt install apparmor-utils
[sudo] password for rjwiii:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apparmor-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'apparmor-utils' has no installation candidate
---------------------------------------------------------------

When I do an 'apt search apparmor-utils' I get:

---------------------------------------------------------------
rjwiii@athiest-geek:~$ apt search apparmor-utils
Sorting... Done
Full Text Search... Done
apparmor-utils/now 2.12-4ubuntu5.1 amd64 [residual-config]
  (none)
---------------------------------------------------------------

I need to install the latest hplip because the new printer I purchased (M255dx) is not supported by the packages in in the repositories.

Revision history for this message
Joseph Mooney (joemooney) wrote :

Ubuntu 18.04 . HPLIP 3.20.6

Answer 14 also worked for me. Thanks!

Install apparmor utils

sudo apt-get install apparmor-utils

Run

sudo aa-disable /usr/share/hplip/plugin.py

Run as normal user, not as root:

hp-plugin

Revision history for this message
Rowland Barkley (masterexorcist) wrote :

I finally found a solution. I tried various version of HPLIP, and there were apparently completely different dependencies reported as missing, and that would not install.

The problem was Python defaulting to version 2.

The solution was to use Synaptic Package Manager, and uninstall "python-is-python2" and install "python-is-python-3" Immediately HPLIP installs correctly in both Ubuntu 18-04 and 20_04.

I installed Hplip and the plugin:

su hplip-3.20.6.run
su hplip-3.20.6-plugin.run

The problem appears to be that some part of the HPLIP install is not specifying which version of python, so it was defaulting to a depricated version.

Now my MFP m281fdn printer and scanner are working perfectly!

Revision history for this message
Doug Schmutz (dougschmutz) wrote :

I think that last comment by Rowland Barkley would solve my problem, but I don't understand his fix since I can't find "python-is-python-2"
Help?

Revision history for this message
Rowland Barkley (masterexorcist) wrote :

In all three cases of Ubuntu 18.04 and later 19.10 and also in Ubuntu 20.04 I solved this bug by clicking:
System → Synaptic Package Manager
Search for python-is
Uninstall python-is-python2
install python-is-python3

Screenshot attached.

It appears that HPLIP needs Python 3, but Ubuntu defaults to the deprecated Python 2. It appears that HP needs to specify the python version it needs, or Ubuntu needs to not default to the deprecated version. Both corrections might save a lot of problems.

Hope this helps.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.