Ubuntu 16.04: HPLIP installer does not accept the root password.
When trying to upgrade to HPLIP 3.17.9 on Ubuntu 16.04.03 the text UI tells me I entered the wrong root password. After 3 trials it aborts. Earlier in the process, the installer detected my Linux distribution as "debian, stretch/sid" which I corrected using the downstream dialog. Since Debian uses "su" to run processes with root permissions, whereas Ubuntu uses "sudo", I suspect that the erroneous distribution detection may be involved in the abort.
On closer inspection, it seems that, internally, the installer uses the "platform" module to detect the distribution, which detects my installation incorrectly:
---
$ python3
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.dist()
('debian', 'stretch/sid', '')
---
Apparently, the "platform.dist()" function is now deprecated and will be removed in Python3.7:
https:/
An alternative for could be "distro" (https:/
---
$ python
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import distro
>>> distro.
('Ubuntu', '16.04', 'Xenial Xerus')
---
To verify that the installer works with that package I
1. ran the installer with the "--confirm" option,
2. let it unpack the files into a local folder,
3. replaced the corresponding lines in 2 files:
lines 598-600 in hplip-3.
---
import distro
name = distro.
ver = distro.
---
lines 78-79 in hplip-3.
---
import distro
os_name = distro.
---
4. confirmed that the install script should be run.
Which successfully installed the new HPLIP version.
In conclusion, you might consider replacing the "platform" module for PyPi's "distro" wherever it is used in the installer.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- HPLIP Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: