How to set-up HP Laserjet 1018 printer on Ubuntu 18.04

Asked by me@mogenseliasen.com on 2021-01-25

I cannot get my HP LaserJet 1018 printer to work on Ubuntu 18.04. I cannot install the plug-in. Could that be the reason. Please take into account that I am NOT a tech.

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
shivani mandora (shivani1708) said : #1

Hi,

Please follow below instruction to install latest run file 3.21.1:
https://developers.hp.com/hp-linux-imaging-and-printing/gethplip

https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index

You can install plugin from below path:

https://developers.hp.com/hp-linux-imaging-and-printing/plugins

Install plugin using $sh hplip-3.20.11.plugin.run

And if you have already done all this, please let me know the error and paste the output here

me@mogenseliasen.com (x-ge-u) said : #2
me@mogenseliasen.com (x-ge-u) said : #3

I am stuck at the second link. I see now that steps 3-10 actually are not steps to perform, but comments to what the terminal does. But what to do after shut down? Nothing happens automatically. What is supposed to be done with the hp-setup command? I do not understand what to do with the steps after step 10. As I fear that the third link is subject to the second link being followed (and finished), I don't dare to do anything with it.

me@mogenseliasen.com (x-ge-u) said : #4

About the link: https://developers.hp.com/hp-linux-imaging-and-printing/plugins

Once you understand that steps 3-10 are actually comment to what the terminal Does for you, and that the three illustrations in steps 11, 12 and 13 are communications from your computer, it helps a little. But what are you to do when the missing plugin (which the whole exercise is all about installing) stops you with an error message in step 13 and never lets you get to do that step, because is is missing the proper plug in? Catch-22!

Can someone enlighten me with a good suggestion to getting that plugin installed WITHOUT assuming that it is already installed?

Manfred Hampl (m-hampl) said : #5

What exactly happens when you download the plugin-installer (with the same version number as the HPLIP installation that you already have) from https://developers.hp.com/hp-linux-imaging-and-printing/plugins and then install the pluging with the command "sh hplip-3.20.11-plugin.run" (change the number if applicable)?

me@mogenseliasen.com (x-ge-u) said : #6

I shall try to answer your questions as precisely as I can.

The steps in the link correspond very closely to your recommendation. Until step 10 they give the same result: hplip get installed, but the fameous error message pops up at the end, saying that the binary plugin is missing, exactly as we discussed. Step 11 starts installing the plugin and opens a window that leads to the window in step 12. If I do nothing, I get the error message that no device can be found. If I uncheck the manual location, I get a little farther on the terminal and the connected printer is no found, but the program stops between step 12 and step 13, saying that the plugin is missing, and therefore the installations is terminate. The error message is this:

The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins.
Please run 'hp-plugin' as normal user to install plug-ins.
Visit http://hplipopensource.com for more infomation.

I can add to that that the link referred to leads to a non-existing page.

The terminal gives the following output:

mogens@mogens-ThinkPad-T60:~$ hp-setup

HP Linux Imaging and Printing System (ver. 3.20.11)
Printer/Fax Setup Utility ver. 9.0

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

Searching... (bus=usb, search=(None), desc=0)
Segmentation fault
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.
Segmentation fault
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.

Done.
mogens@mogens-ThinkPad-T60:~$

This corresponds very closely to what we found before. I was desperate and had given up on getting help. Inspired of the HP texts I could find, I tried this on the terminal:

mogens@mogens-ThinkPad-T60:~$ hp-plugin HP LaserJet 1018 Printer

HP Linux Imaging and Printing System (ver. 3.20.11)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-18 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.20.11)
Plugin Download and Install Utility ver. 2.1

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

Checking for network connection...
Downloading plug-in from:
Receiving digital keys: /usr/bin/gpg --homedir /home/mogens/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.11 Plugin Self Extracting Archive..............................................................

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

Copyright (c) 2001-18 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.20.11
Installed HPLIP version: 3.20.11
Number of files to install: 64

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

So, obviously my previous installation of Python was not good enough. What the hell do I do from here?

Manfred Hampl (m-hampl) said : #7

1. I was not asking for the output of "hp-setup" or "sh hplip-(version).run" but for the output of "sh hplip-(version)-plugin.run"!

2. It seems to me that the installer is misleading with its error message.

quote:
Searching... (bus=usb, search=(None), desc=0)
Segmentation fault
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.

During setup something completely unexpected happens during checking for the plugin ("segmentation fault"), and although already installed the installer interprets the failure as "missing plugin".

I think that the solution to your problem requires finding the reason for "Segmentation fault".

What is the full output of running
sh hplip-3.20.11-plugin.run

me@mogenseliasen.com (x-ge-u) said : #8

mogens@mogens-ThinkPad-T60:~$ sh hplip-3.20.11-plugin.run
sh: 0: Can't open hplip-3.20.11-plugin.run
mogens@mogens-ThinkPad-T60:~$
mogens@mogens-ThinkPad-T60:~$ sh hplip/3.20.11-plugin
sh: 0: Can't open hplip/3.20.11-plugin
mogens@mogens-ThinkPad-T60:~$

I too think "something here is rotten"...

Manfred Hampl (m-hampl) said : #9

Did you already download the hplip-3.20.11-plugin.run file from https://developers.hp.com/hp-linux-imaging-and-printing/plugins and if yes, in which directory did you store it?

If you saved it to the Downloads folder, then you of course need the commands

cd Downloads
sh hplip-3.20.11-plugin.run

I think I already told that in another question, but this probably got lost, because the information is fragmented in several question documents, all to the same topic.

me@mogenseliasen.com (x-ge-u) said : #10

There is something about the sh command that restricts its use on FOLDERS, whereas it never works on documents. hplip-3.2.11-plugin.run and hplip-3.20.11-plugin are DOCUMENTS, not folders. The corresponding folder is called hplip-3.20.11 ) - but how can the computer then know, we want to install a plugin? Very obviously that plugin IS indeed missing, but I have no clue how to enter it into my computer.

I think that the page hplipopensource.com CONTAINED the information we need in order to download the plugin, but that page has been removed and no alternative put in its place, so do not know how to access the information then, leaving me with no clue how to install that missing plugin.

me@mogenseliasen.com (x-ge-u) said : #11

I did install hplip - stored it in the Downloads folder. I did that exactly as advised by you, and retrieved only the error message at the end telling us that the binary plugin wasn't installed.I tried once more the terminal, making sure that it was pointing to Downloads. This was the result:

mogens@mogens-ThinkPad-T60:~$ cd Downloads
mogens@mogens-ThinkPad-T60:~/Downloads$ sh hplips-3.20.11-plugin.run
sh: 0: Can't open hplips-3.20.11-plugin.run
mogens@mogens-ThinkPad-T60:~/Downloads$ sh hplip-3.20.11-plugin
sh: 0: Can't open hplip-3.20.11-plugin
mogens@mogens-ThinkPad-T60: ~$

 We did this before... I think, the binary plugin is simply missing...

Manfred Hampl (m-hampl) said : #12

The sh (shell) command accepts a parameter which has to be a script file with commands. Giving a directory name as parameter to the sh command is nonsense.
The file hplip-3.20.11-plugin.run is some kind of hybrid file that contains shell commands at the beginning and compresses data at the end, suitable to be processed by sh.

This is the last time that I ask for the output of the commands

cd ~/Downloads
sh hplip-3.20.11-plugin.run

(adapt directory name and file name if required).
If you do not provide the information that we need to help, then I will stop answering your questions, because it is useless.

Manfred Hampl (m-hampl) said : #13

Sorry, our messages crossed each other.

Do you have the file hplip-3.20.11-plugin.run somewhere on your hard disk?
If not, then please download it from https://developers.hp.com/hp-linux-imaging-and-printing/plugins and try again.

me@mogenseliasen.com (x-ge-u) said : #14

I have a file named hplip-3.20.11-plugin.run in my Downloads folder. I do not understand why the terminal does not find it. I did everything you asked and brought my observation to you attention. If they are no relevant, then discard them. I am a novice and only understand programming from using hexadecimal machine codes 45 years ago.

I previously downloaded the document you refer to with your link. Neither right-click or left-click with the mouse does anything but OPEN that document, which clearly is a bunch of code. I remember downloading it via the terminal as you suggested, but I honestly cannot remember how. I do not know if it serves any purpose NOW - I don't want to do anything which upsets you.

I have copied and posted here what the terminal says about not being able to find the plugin file. Please see my last post about this. It there another way to provide the information you want?

me@mogenseliasen.com (x-ge-u) said : #15

I tried again, and got a different result this time, probably more to your liking:

mogens@mogens-ThinkPad-T60:~/Downloads$ sh hplip-3.20.11-plugin.run
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.11 Plugin Self Extracting Archive..............................................................

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

Copyright (c) 2001-18 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.20.11
Installed HPLIP version: 3.20.11
Number of files to install: 64

Done.
mogens@mogens-ThinkPad-T60:~/Downloads$

me@mogenseliasen.com (x-ge-u) said : #16

I do not understand why my computer several time could not find the hplip-3.20.11-plugin.run file...

Manfred Hampl (m-hampl) said : #17

Ok. The plugin files now definitely are installed.
(In comment #1 apparently you have mistyped the file name).

If now hp-setup (or other programs) complain that the plugin files are missing, then this is wrong, and probably caused by a crash as already written in comment #7.

What happens if you execute the command

hp-plugin -i

Manfred Hampl (m-hampl) said : #18

(in comment #17 read comment #11 instead of #1 where you have mistyped the file name)

me@mogenseliasen.com (x-ge-u) said : #19

mogens@mogens-ThinkPad-T60:~$ hp-plugin -i

HP Linux Imaging and Printing System (ver. 3.20.11)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-18 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.20.11)
Plugin Download and Install Utility ver. 2.1

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

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)

------------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.20.11 |
------------------------------------------

  Option Description
  ---------- --------------------------------------------------
  d Download plug-in from HP (recommended)
  p Specify a path to the plug-in (advanced)
  q Quit hp-plugin (skip installation)

Enter option (d=download*, p=specify path, q=quit) ? d

-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
Downloading plug-in from:
Downloading plug-in: [\ ] 0% Receiving digital keys: /usr/bin/gpg --homedir /home/mogens/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9
()
error: Unable to recieve key from keyserver
Do you still want to install the plug-in? (y=yes, n=no*, q=quit) ? y

----------------------
| INSTALLING PLUG-IN |
----------------------

Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.11 Plugin Self Extracting Archive..............................................................

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

Copyright (c) 2001-18 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.20.11
Installed HPLIP version: 3.20.11
Number of files to install: 64

You must agree to the license terms before installing the plug-in:

LICENSE TERMS FOR HP Linux Imaging and Printing (HPLIP) Driver Plug-in

These License Terms govern your Use of the HPLIP Driver Plug-in Software (the
"Software"). USE OF THE SOFTWARE INCLUDING, WITHOUT LIMITATION, ANY
DOCUMENTATION, IS SUBJECT TO THESE LICENSE TERMS AND THE APPLICABLE AS-IS
WARRANTY STATEMENT. BY DOWNLOADING AND INSTALLING THE SOFTWARE, YOU ARE AGREEING
TO BE BOUND BY THESE TERMS. IF YOU DO NOT AGREE TO ALL OF THESE TERMS, DO NOT
DOWNLOAD AND INSTALL THE SOFTWARE ON YOUR SYSTEM.

1. License Grant. HP grants you a license to Use one copy of the Software with
HP printing products only. "Use" includes using, storing, loading, installing,
executing, and displaying the Software. You may not modify the Software or
disable any licensing or control features of the Software.

2. Ownership. The Software is owned and copyrighted by HP or its third party
suppliers. Your license confers no title to, or ownership in, the Software and
is not a sale of any rights in the Software. HP's third party suppliers may
protect their rights in the Software in the event of any violation of these
license terms.

3. Copies and Adaptations. You may only make copies or adaptations of the
Software for archival purposes or when copying or adaptation is an essential
step in the authorized Use of the Software. You must reproduce all copyright
notices in the original Software on all copies or adaptations. You may not copy
the Software onto any public network.

4. No Disassembly. You may not Disassemble the Software unless HP's prior
written consent is obtained. "Disassemble" includes disassembling, decompiling,
decrypting, and reverse engineering. In some jurisdictions, HP's consent may not
be required for limited Disassembly. Upon request, you will provide HP with
reasonably detailed information regarding any Disassembly.

5. No Transfer. You may not assign, sublicense or otherwise transfer all or any
part of these License Terms or the Software.

6. Termination. HP may terminate your license, upon notice, for failure to
comply with any of these License Terms. Upon termination, you must immediately
destroy the Software, together with all copies, adaptations and merged portions
in any form.

7. Export Requirements. You may not export or re-export the Software or any copy
or adaptation in violation of any applicable laws or regulations.

8. U.S. Government Restricted Rights. The Software has been developed entirely
at private expense. It is delivered and licensed, as defined in any applicable
DFARS, FARS, or other equivalent federal agency regulation or contract clause,
as either "commercial computer software" or "restricted computer software",
whichever is applicable. You have only those rights provided for such Software
by the applicable clause or regulation or by these License Terms.

9. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
HP AND ITS SUPPLIERS PROVIDE THE SOFTWARE "AS IS" AND WITH ALL FAULTS, AND
HEREBY DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED, OR
STATUTORY, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE AND
NON-INFRINGEMENT, ANY IMPLIED WARRANTIES, DUTIES OR CONDITIONS OF
MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, AND OF LACK OF VIRUSES ALL
WITH REGARD TO THE SOFTWARE. Some states/jurisdictions do not allow exclusion of
implied warranties or limitations on the duration of implied warranties, so the
above disclaimer may not apply to you in its entirety.

10. LIMITATION OF LIABILITY. Notwithstanding any damages that you might incur,
the entire liability of HP and any of its suppliers under any provision of this
agreement and your exclusive remedy for all of the foregoing shall be limited to
the greater of the amount actually paid by you separately for the Software or
U.S. $5.00. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL
HP OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO,
DAMAGES FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS
INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY ARISING OUT OF OR IN ANY
WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, OR OTHERWISE IN
CONNECTION WITH ANY PROVISION OF THIS AGREEMENT, EVEN IF HP OR ANY SUPPLIER HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF THE REMEDY FAILS OF
ITS ESSENTIAL PURPOSE. Some states/jurisdictions do not allow the exclusion or
limitation of incidental or consequential damages, so the above limitation or
exclusion may not apply to you.

Do you accept the license terms for the plug-in (y=yes*, n=no, q=quit) ? y
Please enter the sudoer (mogens)'s password:
Plugin installation failed
error: Plugin installation failed

Done.

Done.
mogens@mogens-ThinkPad-T60:~$

I am sure I accepted the licence agreement and entered the right password. I do not understand why the installation failed.

Manfred Hampl (m-hampl) said : #20

I assume that all this is caused by a crash in some other software (maybe python) that causes some subprocess to fail, and the HPLIP installer (or HPLIP pligin installer) interprets that error in a wrong way and thinks that the plugin installation is missing.

What output do you receive for

hp-setup -q

me@mogenseliasen.com (x-ge-u) said : #21

mogens@mogens-ThinkPad-T60:~$ hp-setup -q

HP Linux Imaging and Printing System (ver. 3.20.11)
Printer/Fax Setup Utility ver. 9.0

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

Searching... (bus=usb, search=(None), desc=0)
Segmentation fault
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.
Segmentation fault
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.

Done.
mogens@mogens-ThinkPad-T60:~$

Same error as we found before....

Best Manfred Hampl (m-hampl) said : #22

As already said.

Segmentation fault.

This error is fully unexpected and the HPLIP installer misinterprets this as failure of the plugin installation.

There must be something broken in your operating system outside HPLIP.
Maybe you should consider re-installing Ubuntu.

me@mogenseliasen.com (x-ge-u) said : #23

I guess you are right, although I do not know what a segmentation fault is, other that an error in the OS. I cannot find other possible explanations either. I am travelling the next three days, but then I will re-install Ubuntu and let you know what happens. I think I can reconstruct what to do, based on your suggestions...

me@mogenseliasen.com (x-ge-u) said : #24

My system is now completely screwed up. With a browser open, I can only type 1-2 characters, without, half a line, if I can save before it freezes. I take that as further confirmation of something being utterly wrong with the OS. When I try to update, I get an error saying that my central processor is too small (2 GB), and I cannot find an OS that will accept that. This means a new computer... And finding one here without WINDOWS installed is not simple. But I shall try. (Typing this message took me through 22 restarts).

me@mogenseliasen.com (x-ge-u) said : #25

Thanks Manfred Hampl, that solved my question.

me@mogenseliasen.com (x-ge-u) said : #26

I did nothing more than said - and it took me a bit with surprise, hence my posting. The system found that file itself through the other commands. Thanks again for the help.