HPLIP Plug-in Won't Install

Asked by Alan Park

I'm trying to get my printer up and running. The scanner says it needs the hplip-plugin installed, but when I ask it to "Download and install the plug-in from an HP authorized server", it does not do anything and doesn't proceed to step 2 of the installer.

I've tried running the install through the command line as root to no avail. And I even tried downloading the file from openprinting and pointing to the file in the installer, but the same thing happened.

Here is the command line output:

Checking for network connection...
Downloading plug-in from:
Downloading plug-in: [\ ] 0% Traceback (most recent call last):
  File "/usr/share/hplip/base/password.py", line 85, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 257, in download
    core = core_install.CoreInstall()
  File "/usr/share/hplip/installer/core_install.py", line 241, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 118, in __init__
    self.__readAuthType() # self.__authType
  File "/usr/share/hplip/base/password.py", line 141, in __readAuthType
    distro_name = get_distro_name().lower().replace(" ","")
  File "/usr/share/hplip/base/password.py", line 88, in get_distro_name
    os_name = distro.linux_distribution()[0]
  File "/usr/lib/python3/dist-packages/distro.py", line 122, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 677, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 737, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 899, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 552, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1012, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_share_hplip_plugin.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/hplip/base/password.py", line 85, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 257, in download
    core = core_install.CoreInstall()
  File "/usr/share/hplip/installer/core_install.py", line 241, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 118, in __init__
    self.__readAuthType() # self.__authType
  File "/usr/share/hplip/base/password.py", line 141, in __readAuthType
    distro_name = get_distro_name().lower().replace(" ","")
  File "/usr/share/hplip/base/password.py", line 88, in get_distro_name
    os_name = distro.linux_distribution()[0]
  File "/usr/lib/python3/dist-packages/distro.py", line 122, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 677, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 737, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 899, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 552, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1012, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

Any guidance would be appreciated! Thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Park
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For a manual plugin installation:

Download the plugin package (the *.run file) in the same version as the HPLIP installation on your system from https://developers.hp.com/hp-linux-imaging-and-printing/plugins and install it with

sh ./hplip-3.21.8-plugin.run

Revision history for this message
Alan Park (your-pal-al) said :
#2

Thanks Manfred, that worked!

Another thing I was doing wrong was I copied the script from the file and pasted it in a new text file with the same name. With this method, the checksum was failing, so instead I right-clicked the plug-in from the link you posted and selected "Save Link As". It worked when I pointed to that file!

Thanks again!