hyperion.ng: Installation Failed - 'hyperion.postinst: root: not found'

  • I confirm that this is an issue rather than a question.

Bug report

Installing on a Raspberry Pi 4 that has the official Homebridge image seems to fail when installing through the terminal.

Steps to reproduce

wget https://github.com/hyperion-project/hyperion.ng/releases/download/2.0.0-alpha.9/Hyperion-2.0.0-alpha.9-Linux-armv7l.deb
sudo apt install ./Hyperion-2.0.0-alpha.9-Linux-armv7l.deb

Response:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'hyperion' instead of './Hyperion-2.0.0-alpha.9-Linux-armv7l.deb'
The following package was automatically installed and is no longer required:
  rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  hyperion
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/80.5 MB of archives.
After this operation, 215 MB of additional disk space will be used.
Get:1 /home/pi/Hyperion-2.0.0-alpha.9-Linux-armv7l.deb hyperion armhf 2.0.0 [80.5 MB]
Selecting previously unselected package hyperion.
(Reading database ... 46431 files and directories currently installed.)
Preparing to unpack .../Hyperion-2.0.0-alpha.9-Linux-armv7l.deb ...
---Hyperion ambient light preinst ---
/var/lib/dpkg/tmp.ci/preinst: 6: /var/lib/dpkg/tmp.ci/preinst: root: not found
Unpacking hyperion (2.0.0) ...
Setting up hyperion (2.0.0) ...
---Hyperion ambient light postinstall ---
/var/lib/dpkg/info/hyperion.postinst: 32: /var/lib/dpkg/info/hyperion.postinst: root: not found
---> init deamon: systemd
Failed to start hyperiond@.service: Unit name hyperiond@.service is missing the instance name.
See system logs and 'systemctl status hyperiond@.service' for details.
---> Install Hyperion desktop icons
--> systemctl start hyperiond for user
-----------------------------------------------------------------------------
---> Hyperion has been installed/updated!
---> 
---> Hyperion has been installed as service, it will start on each system startup
---> For configuration, visit with your browser: 192.168.0.175:8090
---> or if already used by another service try: 192.168.0.175:8091
-----------------------------------------------------------------------------
Webpage: www.hyperion-project.org
Wiki: wiki.hyperion-project.org
Forum: forum.hyperion-project.org
-----------------------------------------------------------------------------

Refer to previous issue raised (#1242).

What is expected?

Successful installation of Hyperion.NG.

What is actually happening?

Pre-installation seems to be failing to located a file, installation seems to not be complete and the service is not created; but the finishing messages seem to think it has still installed.

System

Raspberry Pi 4 using official Homebridge image.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (5 by maintainers)

Most upvoted comments

@mitch7391 Would you mind executing the following command and report back, if there has been an error…

 echo `who | grep -o -m1 '^\w*\b'` || "root"

It looks the script fails to resolve the user in the preinst and postinst scripts:

--># search for users in system, returns first entry
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"

we dont know how th webUI terminal works…maybe it has some “limited” access or so… dont know, but also dont want to invest time in it…sorry, great that it worked in the end.

try it with ssh, yes.

@Paulchen-Panther are you using the official image for Homebridge or have you installed it on Raspbian or using some other method?

Yes official image. But you should also be able to see this from the logs

@Lord-Grey The first command is taken 1:1 from the shell script file. After removing the ` characters, the correct username is displayed. But this seems to be valid in shell as a command substitution. (https://www.cs.ait.ac.th/~on/O/oreilly/unix/upt/ch09_16.htm)

image

After downloading the deb file and installing it using sudo apt-get install, I see no problems with the installation on my system. However, since this was done with an RPi3, I will repeat the same procedure with an RPi4. You can find the complete log here: https://pastebin.com/H77JfiQ7

i think this should work, if yes then there is only a problem with the systemctl service file