Unable to install hplip

Asked by Keith Webley on 2020-12-30

I have just downloaded hplip-3.20.11.run and am running Ubuntu 18.04

When I run sh hplip-3.20.11.run it creates the sub-directory and extracts the archive but the ends with:

hplip-3.20.11.run: 1: eval: ./hplip-install: Permission denied

If I cd into the directory and run:

$ sh hplip-install

I get the error:

hplip-install: 26: hplip-install: ./install.py: Permission denied

If I change the line in the script to sh ./install.py -i $* and run the install script again I get:

$ sh hplip-install
from: can't read /var/mail/__future__
./install.py: 23: ./install.py: __version__: not found
./install.py: 24: ./install.py: __title__: not found
./install.py: 25: ./install.py: __mod__: not found
./install.py: 26: ./install.py: __doc__: not found
import-im6.q16: not authorized `getopt' @ error/constitute.c/WriteImage/1037.
import-im6.q16: not authorized `os' @ error/constitute.c/WriteImage/1037.
import-im6.q16: not authorized `sys' @ error/constitute.c/WriteImage/1037.
import-im6.q16: not authorized `time' @ error/constitute.c/WriteImage/1037.
import-im6.q16: not authorized `re' @ error/constitute.c/WriteImage/1037.
from: can't read /var/mail/base.g
from: can't read /var/mail/base
./install.py: 42: ./install.py: Syntax error: "(" unexpected

What am I doing wrong???

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Keith Webley
Solved:
2020-12-31
Last query:
2020-12-31
Last reply:
2020-12-31
Manfred Hampl (m-hampl) said : #1

install.py is a Python script an should not be run with sh, but with python.

For diagnostic purposes, what is the output of the commands

uname -a
lsb_release -crid
which python
python --version

Keith Webley (kwebley) said : #2

Thank you for the swift response. As I said, without adding "sh" I received a permission denied error.

The various outputs are

uname -a

Linux Keith-desktop 5.4.0-58-generic #64~18.04.1-Ubuntu SMP Wed Dec 9 17:11:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid

Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

which python

/usr/bin/python

python --version

Python 3.6.9

Manfred Hampl (m-hampl) said : #3

What happens if you try

python install.py

Keith Webley (kwebley) said : #4

It works! :-)

Many, many thanks for your help.