romanlum / LoxBerry-Plugin-Zigbee2Mqtt

Apache License 2.0
10 stars 3 forks source link

Error installing php7.4-yaml php7.4-twig g++ - Error 100 #61

Closed Laserlap closed 5 months ago

Laserlap commented 5 months ago

Hello,

I installed Loxberry (newest version) and tried to install Zigbee2MQTT Plugin afterwards. (3 times)

During the plugin installation I get everytime the following error: "CRITICAL: Error installing php7.4-yaml php7.4-twig g++ - Error 100"

Do you have any ideas how to fix?

Hardware Raspberry 4. Raspberry 3b same issue. Installation on another Raspberry 3b in February have been worked fine.

Kind regards Erik

Log:

22:52:23.159 OK: Apt database updated successfully.
22:52:23.267 OK: Apt cache cleaned successfully.
22:52:23.268 INFO: Installing additional software packages.
22:52:23.839 INFO: No process is locking apt or dpkg. Fine.
22:52:23.840 INFO: Installing apt packages  php7.4-yaml php7.4-twig g++...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php7.4-twig
E: Couldn't find any package by glob 'php7.4-twig'
E: Couldn't find any package by regex 'php7.4-twig'
22:52:41.071 CRITICAL: Error installing  php7.4-yaml php7.4-twig g++ - Error 100
22:52:41.072 WARNING: (Some) Packages could not be installed.
22:52:41.092 INFO: Updating skels for Logfiles in tmpfs.
22:53:05.591 OK: Good bye. Enjoy your new plugin!
romanlum commented 5 months ago

There is a new prerelease 2.8.1 that should fix the installation issues`

62

romanlum commented 5 months ago

Can you please try it out and give me feedback if it works for you?

Laserlap commented 5 months ago

installation works for both raspberrys

currently I get "Service stopped (Please check settings and device configuration)" for one of these but I will check it later

thank you for the fix

Laserlap commented 5 months ago

Service will not start. Still message: "Service stopped (Please check settings and device configuration)"

Raspberry 4 (does not work, new raspberry installation + same issue with a new SD card): LoxBerry Version 3.0.1.1 ( is_arch_aarch64.cfg is_hwmodel_raspberry_pi_4_400.cfg is_raspberry.cfg ) Zigbee2Mqtt: Version 2.8.1

Raspberry 3b (does not work, new raspberry installation) INFO: LoxBerry Version 3.0.1.1 ( is_arch_aarch64.cfg is_hwmodel_raspberry_pi_3_3+_zero_2.cfg is_raspberry.cfg ) Zigbee2Mqtt: Version 2.8.1

Raspberry 4 (works, installed in Febrary und Loxberry updated to 3.0.1.1) LoxBerry Version 3.0.1.1 ( is_arch_aarch64.cfg is_hwmodel_raspberry_pi_4_400.cfg is_raspberry.cfg ) Zigbee2Mqtt: Version 2.8.1

romanlum commented 5 months ago

thanks for your feedback. Can you check/add the zigbee2mqtt logs ? /opt/zigbee2mqtt/log/*

Laserlap commented 5 months ago

20240404_204513_914_Service.log 20240404_204513_999_Service.log 20240404_204522_856_Service.log 20240404_204522_924_Service.log

Installation: zigbee2mqtt.log

romanlum commented 5 months ago

There is no zigbee2mqtt.log in /opt/zigbee2mqtt/log/ ?

can you try to start it manually and add the output?

ssh to loxberry

cd /opt/zigbee2mqtt
npm start
Laserlap commented 5 months ago

I copied the /opt/zigbee2mqtt/folder and I also executed your provided comands (see copied log ssh)

20240404_204513_914_Service.log 20240404_204513_999_Service.log 20240404_204522_856_Service.log 20240404_204522_924_Service.log 20240405_085229_211_Service.log 20240405_085229_285_Service.log zigbee2mqtt.log copied log ssh.txt

romanlum commented 5 months ago

Thanks, but the log copied-log-ssh.txt is empty

Laserlap commented 5 months ago

I restarted the raspberry and reconnected the conbee2 and executed your comand

The UI shows still "Service stopped" but the plugin works (I connected a new device)

new try to start the service.txt

new version of ssh copy (sorry forgot to save): copied log ssh.txt

romanlum commented 5 months ago

In the first try there was a problem with the conbee2 stick not recognized...

the new try seems to be ok. Can you check the configuration if the interface is enabled?

Laserlap commented 5 months ago

Where can I find the configuration? zigbee2mgtt UI Configuration.docx

PS: after restart I have to enter your commands again: cd /opt/zigbee2mqtt npm start

thing4711 commented 5 months ago

I had a very similar issue, probably with the similar cause also.

I just installed newest LoxBerry 3.0.1.1 on a Raspberry Pi 4 Model B Rev 1.5 and did all basic configuration steps. I then installed as the first addon this Zigbee2Mqtt plugin in version 2.8.1. Despite correct configuration, and no errors during install, it shows "Service stopped (Please check settings and device configuration)" in LoxBerry GUI. systemctl status zigbee2mqtt.service confirms this:

● zigbee2mqtt.service - zigbee2mqtt
     Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sun 2024-04-07 15:09:36 CEST; 6s ago
    Process: 2530 ExecStart=/usr/bin/npm start (code=exited, status=203/EXEC)
   Main PID: 2530 (code=exited, status=203/EXEC)
        CPU: 3ms

I figured out that npm is only available under /usr/local/bin/npm. Hence, I created a symlinks of npm (and npx, node, and corepack) in /usr/bin and now it seems to start correctly. Zigbee GUI is not available though, but I remember I had this issue in the past and it suddenly worked some time later, so I will probably wait before I complain about this as well ;-).

[UPDATE] I saw the following error message in the log: Error: network commissioning timed out - most likely network with the same panId or extendedPanId already exists nearby It always failed then but restarted and I thought it's working because I apparently always looked up the status when it was in between the failures.

I stopped the service, put the following into configuration.yaml, and started it again: pan_id: GENERATE ext_pan_id: GENERATE network_key: GENERATE

Now it fully started and GUI is also working.

Laserlap commented 5 months ago

Thanks thing4711 and romanlum. Now it works.

I documented the step which I did (Important: Do not use the UI terminal in loxberry!)

cd /opt/zigbee2mqtt/data editor configuration.yaml add the following text after the last parameter: pan_id: GENERATE ext_pan_id: GENERATE network_key: GENERATE

Control+X Y (save) Enter

su - root [root Superuser passwort - see creditial export after loxberry installation] ln -s /usr/local/bin/npm /usr/bin/npm ln -s /usr/local/bin/npx /usr/bin/npx ln -s /usr/local/bin/node /usr/bin/node ln -s /usr/local/bin/corepack /usr/bin/corepack