MQTT Nachrichten in MariaDB speichern / Probleme bei Installation des MySQL Treibers

Status
Für weitere Antworten geschlossen.

NAS-Fritze

Benutzer
Mitglied seit
28. Dez 2016
Beiträge
23
Punkte für Reaktionen
0
Punkte
1
Hallo, ich versuche mich gerade daran, alle möglichen Software-Komponenten zu installieren, die notwendig sind, um Daten, die über Mosquitto rein kommen, in eine Datenbank zu speichern. Ich habe dazu eine wenn auch etwas ältere Anleitung gefunden und diese soweit abgearbeitet, bis ich an die Stelle komme, um den MySQL Treiber für npm zu installieren. Hier kommen viele Warnungen und am Ende steht
Rich (BBCode):
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: invalid distance too far back

npm ERR! A complete log of this run can be found in:
npm ERR!     /var/services/homes/admin/.npm/_logs/2020-01-12T16_38_39_546Z-debug.log

Das sind die Komponeten, die mit npm bereits installiert wurden:
Rich (BBCode):
 npm version
{
  npm: '6.13.4',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.4',
  modules: '72',
  napi: '5',
  nghttp2: '1.39.2',
  node: '12.14.0',
  openssl: '1.1.1d',
  tz: '2019c',
  unicode: '12.1',
  uv: '1.33.1',
  v8: '7.7.299.13-node.16',
  zlib: '1.2.8'
}
Hat jemand eine Idee? Danke schon mal im Voraus!
 

Letrab

Benutzer
Mitglied seit
13. Jan 2020
Beiträge
1
Punkte für Reaktionen
0
Punkte
0
Will answer in English, as I don't speak German, but stil want to help you, and others:

The problem is because of an old/outdated zlib package (1.2.8). (https://github.com/nodejs/node/issues/22839)

You should manually install a newer zlib package (I did it via installing ipkg on Synology, probably there are other ways too) and update the symlinks in /usr/lib/.

Install ipkg: https://community.synology.com/enu/forum/1/post/127148

sudo /opt/bin/ipkg install zlib

sudo ln -sfn /opt/lib/libz.so.1.2.11 /usr/lib/libz.so
sudo ln -sfn /opt/lib/libz.so.1.2.11 /usr/lib/libz.so.1

So it points to the latest zlib (=libz) 1.2.11 which resolves the problem!

But do restore it back, because else apparently the webinterface (at port 5000) is broken...

sudo ln -sfn /usr/lib/libz.so.1.2.8 /usr/lib/libz.so
sudo ln -sfn /usr/lib/libz.so.1.2.8 /usr/lib/libz.so.1
 
Zuletzt bearbeitet:

NAS-Fritze

Benutzer
Mitglied seit
28. Dez 2016
Beiträge
23
Punkte für Reaktionen
0
Punkte
1
Thank you very much for your help! Finally I made it. I had to restart the NAS after adding the cphub- ressources. And I got you wrong with the symlinks. I changed them back to early :-( But now I got it. Thanks again!
 
Zuletzt bearbeitet:

robotnik

Benutzer
Mitglied seit
10. Apr 2020
Beiträge
5
Punkte für Reaktionen
0
Punkte
0
Will answer in English, as I don't speak German, but stil want to help you, and others:

The problem is because of an old/outdated zlib package (1.2.8). (https://github.com/nodejs/node/issues/22839)

You should manually install a newer zlib package (I did it via installing ipkg on Synology, probably there are other ways too) and update the symlinks in /usr/lib/.

Install ipkg: https://community.synology.com/enu/forum/1/post/127148

sudo /opt/bin/ipkg install zlib

sudo ln -sfn /opt/lib/libz.so.1.2.11 /usr/lib/libz.so
sudo ln -sfn /opt/lib/libz.so.1.2.11 /usr/lib/libz.so.1

So it points to the latest zlib (=libz) 1.2.11 which resolves the problem!

But do restore it back, because else apparently the webinterface (at port 5000) is broken...

sudo ln -sfn /usr/lib/libz.so.1.2.8 /usr/lib/libz.so
sudo ln -sfn /usr/lib/libz.so.1.2.8 /usr/lib/libz.so.1

Hey Letrab,

thanks a lot for your help! I am sure this way npm should be usable, but I bricked my NAS by stupidly rewriting the file links in a wrong way.
What I did was:
sudo ln -sfn /opt/lib/libz.so.1.2.11-2 /usr/lib/libz.so
sudo ln -sfn /opt/lib/libz.so.1.2.11-2 /usr/lib/libz.so.1
instead of
sudo ln -sfn /opt/lib/libz.so.1.2.11 /usr/lib/libz.so
sudo ln -sfn /opt/lib/libz.so.1.2.11 /usr/lib/libz.so.1

What happened of course is, that the libz link is now broken and nothing works anymore, INCLUDING SUDO
So, if I would like to change the links again, I will get the following error:
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: unable to load /usr/lib/sudoers.so: libz.so.1: cannot open shared object file: No such file or directory
sudo: fatal error, unable to load plugins

I know, I should have taken much more care while modifying the links, but what's done is done and I am trying to get the NAS back to work.

I tried:
LD_PRELOAD=/usr/lib/libz.so.1.2.8
and then sudo, also with export, none of it worked, threw me the same error.

Is there any way to fix the file link?
 
Status
Für weitere Antworten geschlossen.
 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat