Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem install on Raspberry Pi OS (64-bit) debian 12 bookworm #11

Closed
botho opened this issue Oct 13, 2023 · 9 comments
Closed

Problem install on Raspberry Pi OS (64-bit) debian 12 bookworm #11

botho opened this issue Oct 13, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@botho
Copy link

botho commented Oct 13, 2023

Analysis

When running "sudo apt-get install homebridge" here is the output error

Preparing to unpack .../homebridge_1.0.34_arm64.deb ...
Running pre-install steps...
Unpacking may take several minutes on low powered devices.
Unpacking homebridge (1.0.34) ...
Setting up homebridge (1.0.34) ...
Running post-install steps...
Adding system user homebridge' (UID 112) ... Adding new group homebridge' (GID 122) ...
Adding new user homebridge' (UID 112) with group homebridge' ...
Not creating `/nonexistent'.
cp: cannot create regular file '/home/homebridge/.bashrc': No such file or directory
chown: cannot access '/home/homebridge/.bashrc': No such file or directory

Starting Homebridge service....

Homebridge Installation Complete!
You can access the Homebridge UI via:

Thanks for installing Homebridge!

ℹ Updating Node.js from v18.16.0 to v18.18.1...
ℹ Target: /opt/homebridge
✔ Download complete.
✔ Cleaned up npm at at /opt/homebridge/lib/node_modules/npm
✔ Installed Node.js v18.18.1
⚠ Please restart Homebridge for the changes to take effect.

Expected Behavior

expected no error

Steps To Reproduce

sudo apt-get install homebridge

Logs

When running "sudo apt-get install homebridge" here is the output error 

Preparing to unpack .../homebridge_1.0.34_arm64.deb ...
Running pre-install steps...
Unpacking may take several minutes on low powered devices.
Unpacking homebridge (1.0.34) ...
Setting up homebridge (1.0.34) ...
Running post-install steps...
Adding system user `homebridge' (UID 112) ...
Adding new group `homebridge' (GID 122) ...
Adding new user `homebridge' (UID 112) with group `homebridge' ...
**Not creating `/nonexistent'.
cp: cannot create regular file '/home/homebridge/.bashrc': No such file or directory
chown: cannot access '/home/homebridge/.bashrc': No such file or directory**
Starting Homebridge service....

Homebridge Installation Complete!
You can access the Homebridge UI via:

* http://192.168.1.11:8581

Thanks for installing Homebridge!

ℹ Updating Node.js from v18.16.0 to v18.18.1...
ℹ Target: /opt/homebridge
✔ Download complete.
✔ Cleaned up npm at at /opt/homebridge/lib/node_modules/npm
✔ Installed Node.js v18.18.1
⚠ Please restart Homebridge for the changes to take effect.

Configuration

fresh install

Environment

  • OS: Raspberry Pi OS (64-bit) debian 12 bookworm
  • Software:
  • Node:
  • npm:

Process Supervisor

hb-service

Additional Context

When installing plugin, I have another error about directory "nonexistent"

$ hb-service add homebridge-tydom
ℹ CMD: npm --prefix "/var/lib/homebridge" add homebridge-tydom@latest
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /nonexistent
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/nonexistent'
npm ERR! [Error: EACCES: permission denied, mkdir '/nonexistent'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/nonexistent'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! Log files were not written due to an error writing to the directory: /nonexistent/.npm/_logs
npm ERR! You can rerun the command with --loglevel=verbose to see the logs in your terminal
✖ Plugin installation failed.

workaround : add homebridge user by yourself before installation

@botho botho added the bug Something isn't working label Oct 13, 2023
@txhtxh11
Copy link

waiting

@botho
Copy link
Author

botho commented Oct 15, 2023

workaround : add homebridge user by yourself before installation

@SSkull995
Copy link

SSkull995 commented Oct 15, 2023

Hi Botho,
I have the same issue, plus if I try to update the gui-x plugin I always get an error access. No permissions granted. How did you manage?
Thank you.

@botho
Copy link
Author

botho commented Oct 16, 2023

Hi Botho, I have the same issue, plus if I try to update the gui-x plugin I always get an error access. No permissions granted. How did you manage? Thank you.

Do a complete uninstallation and delete homebridge user:

sudo apt-get remove homebridge
sudo rm -rf /etc/apt/sources.list.d/homebridge.list
sudo apt-get purge homebridge
sudo deluser -remove-home homebridge

Installtion:

sudo adduser --system --group homebridge --home /home/homebridge
curl -sSfL https://repo.homebridge.io/KEY.gpg | sudo gpg --dearmor | sudo tee /usr/share/keyrings/homebridge.gpg  > /dev/null
echo "deb [signed-by=/usr/share/keyrings/homebridge.gpg] https://repo.homebridge.io stable main" | sudo tee /etc/apt/sources.list.d/homebridge.list > /dev/null
sudo apt-get update && sudo apt-get install homebridge
sudo hb-service update-node 

@txhtxh11
Copy link

txhtxh11 commented Oct 16, 2023 via email

@botho botho changed the title Problem on Raspberry Pi OS (64-bit) debian 12 bookworm Problem install on Raspberry Pi OS (64-bit) debian 12 bookworm Oct 16, 2023
@NorthernMan54 NorthernMan54 transferred this issue from homebridge/homebridge Oct 17, 2023
@NorthernMan54
Copy link
Contributor

This issue is creatable with bookwork 64 gb lite

@NorthernMan54
Copy link
Contributor

The adduser command appears to have changed with bookworm and now does this

Add a system user
       If called with one non-option argument and the --system option, adduser will add a dynamically allocated system user,  often  abbreviated
       as system user in the context of the adduser package.

       adduser  will  choose the first available UID from the range specified by FIRST_SYSTEM_UID and LAST_SYSTEM_UID in the configuration file.
       This can be overridden with the --uid option.

       By default, system users are placed in the nogroup group.  To place the new system user in an already existing group, use  the  --gid  or
       --ingroup options.  If the --group is given and the identically named group does not already exist, it is created with the same ID.

       If  no  home directory is specified, the default home directory for a new system user is /nonexistent.  This directory should never exist
       on any Debian system, and adduser will never create it automatically.

       Unless a shell is explicitly set with the --shell option, the new system user will have the  shell  set  to  /usr/sbin/nologin.   adduser
       --system does not set a password for the new account.  Skeletal configuration files are not copied.

       Other options will behave as for the creation of a normal user.  The files referenced by UID_POOL and GID_POOL do also work.

NorthernMan54 added a commit that referenced this issue Oct 17, 2023
@txhtxh11
Copy link

txhtxh11 commented Oct 17, 2023 via email

@NorthernMan54
Copy link
Contributor

The homebridge Debian package has been updated to resolve this issue going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants