Installer cannot find /etc/PolicyKit, but it is now /etc/polkit-1

Bug #1796864 reported by Martin Gladigau on 2018-10-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Undecided
Unassigned

Bug Description

I am running Arch Linux.
When trying to install hplip as described here: https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index , I get the following output/error:

####################################################################################################

$ sh /home/maddin/user_programs/hplip-3.18.9.run

Creating directory hplip-3.18.9
Verifying archive integrity... All good.
Uncompressing HPLIP 3.18.9 Self Extracting Archive.. [more ...]

HP Linux Imaging and Printing System (ver. 3.18.9)
HPLIP Installer ver. 5.1

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.

Installer log saved in: hplip-install_Tue-09-Oct-2018_13:01:27.log
                                                                                                         \
note: Defaults for each question are maked with a '*'. Press <enter> to accept the default. -Traceback (most recent call last):
  File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line 266, in walkFiles
    names = os.listdir(root)
FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line 268, in walkFiles
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./install.py", line 241, in <module>
    text_install.start(language, auto, test_depends, test_unknown, assume_network, max_retries, enable, disable)
  File "/home/maddin/user_programs/hplip-3.18.9/installer/text_install.py", line 86, in start
    core.init()
  File "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line 528, in init
    self.check_dependencies(callback)
  File "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line 621, in check_dependencies
    self.have_dependencies[d] = self.dependencies[d][3]()
  File "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line 1242, in check_policykit
    if check_file('PolicyKit.conf', "/etc/PolicyKit") and check_file('org.gnome.PolicyKit.AuthorizationManager.service', "/usr/share/dbus-1/services"):
  File "/home/maddin/user_programs/hplip-3.18.9/installer/dcheck.py", line 108, in check_file
    for w in utils.walkFiles(dir, recurse=True, abs_paths=True, return_folders=False, pattern=f):
RuntimeError: generator raised StopIteration

####################################################################################################

So the installer cannot find '/etc/PolicyKit'. This is no wonder, since the name PolicyKit is outdated, as described here: https://en.wikipedia.org/wiki/Polkit . In fact, I do have a folder called '/etc/polkit-1'.

Note: How I got there:

Before trying this way, I tried to install via 'pacman -S hplip'. This does work, however, hp-check will print: 'warning: CUPSEXT could not be loaded. Please check HPLIP installation.'
So I looked at this page: https://www.cyberciti.biz/faq/debian-ubuntu-hp-linux-imaging-printing-warning-cupsext/ and, even though it is debian here, I thought I'd give it a try installing from the run-file instead of via pacman.

When I try to run something like hp-systray after installing via pacman, I do get the error "ModuleNotFoundError: No module named 'cupsext'".
When I run hp-doctor, it fails due to not finding '/etc/PolicyKit' again:

####################################################################################################

$ hp-doctor

HP Linux Imaging and Printing System (ver. 3.18.6)
Self Diagnse Utility and Healing Utility ver. 1.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.

HP Linux Imaging and Printing System (ver. 3.18.6)
Self Diagnse Utility and Healing Utility ver. 1.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.
                                                                                            \Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 266, in walkFiles
    names = os.listdir(root)
FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 268, in walkFiles
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/hp-doctor", line 276, in <module>
    dep.core.init()
  File "/usr/share/hplip/installer/core_install.py", line 500, in init
    self.check_dependencies(callback)
  File "/usr/share/hplip/installer/core_install.py", line 593, in check_dependencies
    self.have_dependencies[d] = self.dependencies[d][3]()
  File "/usr/share/hplip/installer/core_install.py", line 1164, in check_policykit
    if check_file('PolicyKit.conf', "/etc/PolicyKit") and check_file('org.gnome.PolicyKit.AuthorizationManager.service', "/usr/share/dbus-1/services"):
  File "/usr/share/hplip/installer/dcheck.py", line 108, in check_file
    for w in utils.walkFiles(dir, recurse=True, abs_paths=True, return_folders=False, pattern=f):
RuntimeError: generator raised StopIteration

####################################################################################################

So whether I use pacman or the .run - file, the problem seems to be the same in the end.

Could you please fix this or at least tell me a good workaround?

tags: added: install
brian_p (claremont102) wrote :

What is your printer?

--
Brian.

Martin Gladigau (maddingl) wrote :

I have a HP Officejet 5230

Download full text (6.7 KiB)

I have a HP Officejet 5230

On Tue, 9 Oct 2018 at 20:11, brian_p <email address hidden> wrote:

> What is your printer?
>
> --
> Brian.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1796864
>
> Title:
> Installer cannot find /etc/PolicyKit, but it is now /etc/polkit-1
>
> Status in HPLIP:
> New
>
> Bug description:
> I am running Arch Linux.
> When trying to install hplip as described here:
> https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index
> , I get the following output/error:
>
>
> ####################################################################################################
>
> $ sh /home/maddin/user_programs/hplip-3.18.9.run
>
> Creating directory hplip-3.18.9
> Verifying archive integrity... All good.
> Uncompressing HPLIP 3.18.9 Self Extracting Archive.. [more ...]
>
> HP Linux Imaging and Printing System (ver. 3.18.9)
> HPLIP Installer ver. 5.1
>
> 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.
>
> Installer log saved in: hplip-install_Tue-09-Oct-2018_13:01:27.log
>
> \
> note: Defaults for each question are maked with a '*'. Press <enter> to
> accept the default. -Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 266, in walkFiles
> names = os.listdir(root)
> FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 268, in walkFiles
> raise StopIteration
> StopIteration
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "./install.py", line 241, in <module>
> text_install.start(language, auto, test_depends, test_unknown,
> assume_network, max_retries, enable, disable)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/text_install.py", line
> 86, in start
> core.init()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 528, in init
> self.check_dependencies(callback)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 621, in check_dependencies
> self.have_dependencies[d] = self.dependencies[d][3]()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 1242, in check_policykit
> if check_file('PolicyKit.conf', "/etc/PolicyKit") and
> check_file('org.gnome.PolicyKit.AuthorizationManager.service',
> "/usr/share/dbus-1/services"):
> File "/home/maddin/user_programs/hplip-3.18.9/installer/dcheck.py",
> line 108, in check_file
> for w in utils.walkFiles(dir, recurse=True, abs_paths=True,
> return_folders=False, pattern=f):
> RuntimeError: generator raised StopIteration...

Read more...

brian_p (claremont102) wrote :

This printer has AirPrint, so it is a candidate for driverless printing:

https://wiki.debian.org/DriverlessPrinting

If you have at least CUPS 2.2.4, there is

https://wiki.debian.org/PrintQueuesCUPS#Temporary_Queue_Creation_by_CUPS

With a driver, see

https://bugs.launchpad.net/hplip/+bug/1796584

I believe Arch is not a supported distro for HPLIP.

--
Brian.

Martin Gladigau (maddingl) wrote :
Download full text (7.0 KiB)

Thanks, I'll check it out.

On Wed, 10 Oct 2018 at 10:50, brian_p <email address hidden> wrote:

> This printer has AirPrint, so it is a candidate for driverless printing:
>
> https://wiki.debian.org/DriverlessPrinting
>
> If you have at least CUPS 2.2.4, there is
>
> https://wiki.debian.org/PrintQueuesCUPS#Temporary_Queue_Creation_by_CUPS
>
> With a driver, see
>
> https://bugs.launchpad.net/hplip/+bug/1796584
>
> I believe Arch is not a supported distro for HPLIP.
>
> --
> Brian.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1796864
>
> Title:
> Installer cannot find /etc/PolicyKit, but it is now /etc/polkit-1
>
> Status in HPLIP:
> New
>
> Bug description:
> I am running Arch Linux.
> When trying to install hplip as described here:
> https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index
> , I get the following output/error:
>
>
> ####################################################################################################
>
> $ sh /home/maddin/user_programs/hplip-3.18.9.run
>
> Creating directory hplip-3.18.9
> Verifying archive integrity... All good.
> Uncompressing HPLIP 3.18.9 Self Extracting Archive.. [more ...]
>
> HP Linux Imaging and Printing System (ver. 3.18.9)
> HPLIP Installer ver. 5.1
>
> 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.
>
> Installer log saved in: hplip-install_Tue-09-Oct-2018_13:01:27.log
>
> \
> note: Defaults for each question are maked with a '*'. Press <enter> to
> accept the default. -Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 266, in walkFiles
> names = os.listdir(root)
> FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 268, in walkFiles
> raise StopIteration
> StopIteration
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "./install.py", line 241, in <module>
> text_install.start(language, auto, test_depends, test_unknown,
> assume_network, max_retries, enable, disable)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/text_install.py", line
> 86, in start
> core.init()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 528, in init
> self.check_dependencies(callback)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 621, in check_dependencies
> self.have_dependencies[d] = self.dependencies[d][3]()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 1242, in check_policykit
> if check_file('PolicyKit.conf', "/etc/PolicyKit") and...

Read more...

brian_p (claremont102) wrote :

Checked out now? How did it go?

--
Brian.

Martin Gladigau (maddingl) wrote :
Download full text (6.8 KiB)

I haven't had the time to do that by now, probably Sunday :) Thanks for
asking :)

On Fri, 12 Oct 2018 at 21:12, brian_p <email address hidden> wrote:

> Checked out now? How did it go?
>
> --
> Brian.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1796864
>
> Title:
> Installer cannot find /etc/PolicyKit, but it is now /etc/polkit-1
>
> Status in HPLIP:
> New
>
> Bug description:
> I am running Arch Linux.
> When trying to install hplip as described here:
> https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index
> , I get the following output/error:
>
>
> ####################################################################################################
>
> $ sh /home/maddin/user_programs/hplip-3.18.9.run
>
> Creating directory hplip-3.18.9
> Verifying archive integrity... All good.
> Uncompressing HPLIP 3.18.9 Self Extracting Archive.. [more ...]
>
> HP Linux Imaging and Printing System (ver. 3.18.9)
> HPLIP Installer ver. 5.1
>
> 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.
>
> Installer log saved in: hplip-install_Tue-09-Oct-2018_13:01:27.log
>
> \
> note: Defaults for each question are maked with a '*'. Press <enter> to
> accept the default. -Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 266, in walkFiles
> names = os.listdir(root)
> FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
> 268, in walkFiles
> raise StopIteration
> StopIteration
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "./install.py", line 241, in <module>
> text_install.start(language, auto, test_depends, test_unknown,
> assume_network, max_retries, enable, disable)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/text_install.py", line
> 86, in start
> core.init()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 528, in init
> self.check_dependencies(callback)
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 621, in check_dependencies
> self.have_dependencies[d] = self.dependencies[d][3]()
> File
> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
> 1242, in check_policykit
> if check_file('PolicyKit.conf', "/etc/PolicyKit") and
> check_file('org.gnome.PolicyKit.AuthorizationManager.service',
> "/usr/share/dbus-1/services"):
> File "/home/maddin/user_programs/hplip-3.18.9/installer/dcheck.py",
> line 108, in check_file
> for w in utils.walkFiles(dir, recurse=True, abs_paths=True,
> return_folders=F...

Read more...

Martin Gladigau (maddingl) wrote :
Download full text (7.1 KiB)

It works now :) I ended up using the CUPS webinterface. Thanks!

On Fri, 12 Oct 2018 at 21:15, Martin Gladigau <email address hidden>
wrote:

> I haven't had the time to do that by now, probably Sunday :) Thanks for
> asking :)
>
> On Fri, 12 Oct 2018 at 21:12, brian_p <email address hidden> wrote:
>
>> Checked out now? How did it go?
>>
>> --
>> Brian.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1796864
>>
>> Title:
>> Installer cannot find /etc/PolicyKit, but it is now /etc/polkit-1
>>
>> Status in HPLIP:
>> New
>>
>> Bug description:
>> I am running Arch Linux.
>> When trying to install hplip as described here:
>> https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index
>> , I get the following output/error:
>>
>>
>> ####################################################################################################
>>
>> $ sh /home/maddin/user_programs/hplip-3.18.9.run
>>
>> Creating directory hplip-3.18.9
>> Verifying archive integrity... All good.
>> Uncompressing HPLIP 3.18.9 Self Extracting Archive.. [more ...]
>>
>> HP Linux Imaging and Printing System (ver. 3.18.9)
>> HPLIP Installer ver. 5.1
>>
>> 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.
>>
>> Installer log saved in: hplip-install_Tue-09-Oct-2018_13:01:27.log
>>
>> \
>> note: Defaults for each question are maked with a '*'. Press <enter> to
>> accept the default. -Traceback (most recent call last):
>> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
>> 266, in walkFiles
>> names = os.listdir(root)
>> FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>> File "/home/maddin/user_programs/hplip-3.18.9/base/utils.py", line
>> 268, in walkFiles
>> raise StopIteration
>> StopIteration
>>
>> The above exception was the direct cause of the following exception:
>>
>> Traceback (most recent call last):
>> File "./install.py", line 241, in <module>
>> text_install.start(language, auto, test_depends, test_unknown,
>> assume_network, max_retries, enable, disable)
>> File
>> "/home/maddin/user_programs/hplip-3.18.9/installer/text_install.py", line
>> 86, in start
>> core.init()
>> File
>> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
>> 528, in init
>> self.check_dependencies(callback)
>> File
>> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
>> 621, in check_dependencies
>> self.have_dependencies[d] = self.dependencies[d][3]()
>> File
>> "/home/maddin/user_programs/hplip-3.18.9/installer/core_install.py", line
>> 1242, in check_policykit
>> if check_file('PolicyKit.conf', "/etc/PolicyKit") and
>> check_file('org.gnome.PolicyKit.AuthorizationMa...

Read more...

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

Other bug subscribers