cancel
Showing results for 
Search instead for 
Did you mean: 

stm32mp157 HPLIP support

xkun.1
Associate II

Hello,

I need use STM32MP157 connect a HP USB printer. New I need install HPLIP package. I am currently using NFS.

But when I use this command "apt-get install hplip", I will receive error infomation. As shown below.

Reading package lists... Done

Building dependency tree

Reading state information... Done

hplip is already the newest version (3.19.12-r0).

0 upgraded, 0 newly installed, 0 to remove and 276 not upgraded.

1 not fully installed or removed.

After this operation, 0 B of additional disk space will be used.

Do you want to continue? [Y/n] y

The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA).

The detailed content licenses can be found at https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.

Setting up hplip (3.19.12-r0) ...

The unit files have no installation config (WantedBy=, RequiredBy=, Also=,

Alias= settings in the [Install] section, and DefaultInstance= for template

units). This means they are not meant to be enabled using systemctl.

Possible reasons for having this kind of units are:

• A unit may be statically enabled by being symlinked from another unit's

 .wants/ or .requires/ directory.

• A unit's purpose may be to act as a helper for some other unit which has

 a requirement dependency on it.

• A unit may be started when needed via activation (socket, path, timer,

 D-Bus, udev, scripted systemctl call, ...).

• In case of template units, the unit is meant to be enabled with some

 instance name specified.

Failed to restart hplip-printer@.service: Unit name hplip-printer@.service is missing the instance name.

See system logs and 'systemctl status hplip-printer@.service' for details.

dpkg: error processing package hplip (--configure):

 installed hplip package post-installation script subprocess returned error exit status 1

Errors were encountered while processing:

 hplip

E: Sub-process /usr/bin/dpkg returned an error code (1)

Please help me. Thanks.

Shaw.

1 ACCEPTED SOLUTION

Accepted Solutions
Jean-Marc B
ST Employee

Hello @xkun.1​ 

Did you have any piece of news?

I just pushed on the packages server an updated package hplip for OpenSTLinux 3.0. This package no longer generates error when installing or uninstalling it. To get it, just do:

$ apt-get update
$ apt-get install hplip

Best regards,

--JM

View solution in original post

3 REPLIES 3
Jean-Marc B
ST Employee

Hi @xkun.1​ 

The recipe that provides the hplip package cames from Yocto (https://layers.openembedded.org/layerindex/recipe/122979/) and is untouched in OpenSTLinux. I am not an expert in systemd management but I guess the error message you see comes from the file /lib/systemd/system/hplip-printer@.service. First, look at the file name and then to its content:

[Unit]
Description=Configure HP Plugged-In Printer
 
[Service]
ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer "%i"

This means the .service file is a template and it should be initialized so the «%i» will be replaced. For example the command:

$ systemctl start hplip-printer@myprinter.service

would replace «%i» by «myprinter».

So I think the Yocto recipe is misleading by attempting to start the hplip service by itself.

Did you try to setup your printer with the hp-setup binary program?

Best regards,

--JM

Jean-Marc B
ST Employee

Hello @xkun.1​ 

Did you have any piece of news?

I just pushed on the packages server an updated package hplip for OpenSTLinux 3.0. This package no longer generates error when installing or uninstalling it. To get it, just do:

$ apt-get update
$ apt-get install hplip

Best regards,

--JM

Hi JM,

  Thank you for your work. You really moved me, especially after so many days, you are still trying to solve my problems. You're right. There are no more mistakes. Thanks again.