Super Tipp.
Laut log startet der p4d, aber bekommt wie du sagst keine Verbindung zur Datenbank.
Ich werd mariadb.service hinzu fügen. Dann sollte es laufen.
Besten Dank.
Super Tipp.
Laut log startet der p4d, aber bekommt wie du sagst keine Verbindung zur Datenbank.
Ich werd mariadb.service hinzu fügen. Dann sollte es laufen.
Besten Dank.
Das war der Status heute morgen nach den Stromausfällen:
root@debian:/# systemctl status p4d
● p4d.service - Deamon to capture data of the P4 pellet heating
Loaded: loaded (/etc/systemd/system/p4d.service; enabled; vendor preset: e>
Active: failed (Result: exit-code) since Sat 2021-06-05 10:41:11 CEST; 3mi>
Process: 517 ExecStart=/usr/local/bin/p4d (code=exited, status=0/SUCCESS)
Main PID: 518 (code=exited, status=1/FAILURE)
CPU: 54ms
Jun 05 10:41:11 debian systemd[1]: p4d.service: Failed with result 'exit-code'.
Jun 05 10:41:11 debian systemd[1]: p4d.service: Scheduled restart job, restart >
Jun 05 10:41:11 debian systemd[1]: Stopped Deamon to capture data of the P4 pel>
Jun 05 10:41:11 debian systemd[1]: p4d.service: Start request repeated too quic>
Jun 05 10:41:11 debian systemd[1]: p4d.service: Failed with result 'exit-code'.
Jun 05 10:41:11 debian systemd[1]: Failed to start Deamon to capture data of th>
Alles anzeigen
Das der Status nach dem manuellen Start mit systemctl start p4d:
root@debian:/# systemctl status p4d
● p4d.service - Deamon to capture data of the P4 pellet heating
Loaded: loaded (/etc/systemd/system/p4d.service; enabled; vendor preset: e>
Active: active (running) since Sat 2021-06-05 10:44:47 CEST; 2s ago
Process: 616 ExecStart=/usr/local/bin/p4d (code=exited, status=0/SUCCESS)
Main PID: 617 (p4d)
Tasks: 2 (limit: 2303)
Memory: 2.8M
CPU: 139ms
CGroup: /system.slice/p4d.service
└─617 /usr/local/bin/p4d
Jun 05 10:44:47 debian p4d[617]: Loaded (1) states [:5]
Jun 05 10:44:47 debian p4d[617]: Info: No sensor script '/etc/p4d/script-sensor>
Jun 05 10:44:47 debian p4d[617]: Info: No One-Wire sensors found, path '/sys/bu>
Jun 05 10:44:47 debian p4d[617]: WebSocket Listener at port (1111) established
Jun 05 10:44:47 debian p4d[617]: using libwebsocket version '4.2.99-v4.2.0-47-g>
Jun 05 10:44:47 debian p4d[617]: Scheduled aggregation for '06.06.2021 01:00:00>
Jun 05 10:44:47 debian p4d[617]: :: started syncThread
Jun 05 10:44:47 debian p4d[617]: Time drift is -7196 seconds
Jun 05 10:44:47 debian p4d[617]: Time drift is -7196 seconds, syncing now
Jun 05 10:44:47 debian p4d[617]: Time sync succeeded
Alles anzeigen
Und das hier der Status nach systemctl enable p4d
root@debian:/# systemctl status p4d
● p4d.service - Deamon to capture data of the P4 pellet heating
Loaded: loaded (/etc/systemd/system/p4d.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-06-05 10:44:47 CEST; 1h 7min ago
Main PID: 617 (p4d)
Tasks: 2 (limit: 2303)
Memory: 4.9M
CPU: 31.165s
CGroup: /system.slice/p4d.service
└─617 /usr/local/bin/p4d
Jun 05 11:49:57 debian p4d[617]: Updating error list
Jun 05 11:49:59 debian p4d[617]: Updating error list done in 1622ms
Jun 05 11:50:58 debian p4d[617]: Processed 37 samples, state is 'Feuer Aus'
Jun 05 11:50:58 debian p4d[617]: client 0xffffffffffffffff not found! [{"event": "all", "object": []}]
Jun 05 11:50:58 debian p4d[617]: Updating error list
Jun 05 11:50:59 debian p4d[617]: Updating error list done in 1709ms
Jun 05 11:51:58 debian p4d[617]: Processed 37 samples, state is 'Feuer Aus'
Jun 05 11:51:58 debian p4d[617]: client 0xffffffffffffffff not found! [{"event": "all", "object": []}]
Jun 05 11:51:58 debian p4d[617]: Updating error list
Jun 05 11:51:59 debian p4d[617]: Updating error list done in 1701ms
Alles anzeigen
Ja soweit klar.
Wenn ich den p4d mit "systemctl enable p4d" starte läuft er. Wenn der Server hochfährt, wird p4d nicht automatisch mit gestartet. Das ist was ich meine.
Ich muss mich leider nochmal melden.
Vorab: auch funktionell hat sich einiges getan. Respekt! Echt grandios geworden der p4d.
Nun aber die eigentliche Frage:
Ich hatte heute Nacht zwei Stromausfälle, und hab eben gemerkt dass der p4d nicht automatisch mit debian startet.
Muss ich das über cron oder so selbst einrichten oder sollte der p4d eigentlich automatisch starten und ich hab noch irgendwo nen Fehler gemacht?
Klingt interessant, denke ich, wenn man davon was versteht.
Riesen Dank auf jeden Fall. Der deamon läuft nun ohne Fehlereinträge im syslog.
Webinterface ist erreichbar und Datenaufzeichnung sollte laufen.
Hat sich auch optisch einiges getan. Hut ab!
Das heißt jetzt was? Du kannst in der Anleitung was anpassen? Was macht das "pkg-config"?
make clean all
root@debian:/usr/src/linux-p4d# make clean all
rm -f */*.o *.o core* *~ */*~ lib/t *.jpg
rm -f p4d dbchart p4 p4d-0.7.6.tgz
rm -f com2
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/db.o lib/db.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/dbdict.o lib/dbdict.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/common.o lib/common.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/serial.o lib/serial.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/thread.o lib/thread.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/curl.o lib/curl.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/json.o lib/json.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/mqtt.o lib/mqtt.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/mqtt_c.o lib/mqtt_c.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/mqtt_pal.o lib/mqtt_pal.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o main.o main.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o p4io.o p4io.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o service.o service.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o w1.o w1.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o hass.o hass.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o websock.o websock.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o wsactions.o wsactions.c
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o p4d.o p4d.c
g++ lib/db.o lib/dbdict.o lib/common.o lib/serial.o lib/thread.o lib/curl.o lib/json.o lib/mqtt.o lib/mqtt_c.o lib/mqtt_pal.o main.o p4io.o service.o w1.o hass.o websock.o wsactions.o p4d.o -lxml2 -L/usr/local/lib -l:libwebsockets.a -ljansson -lssl -lz -L/usr/lib/x86_64-linux-gnu/ -lmariadb -lrt -lcrypto -lcurl -lpthread -luuid -o p4d
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o p4cmd.o p4cmd.c
g++ p4cmd.o p4io.o lib/serial.o service.o w1.o lib/common.o -lxml2 -L/usr/local/lib -l:libwebsockets.a -ljansson -lssl -lz -L/usr/lib/x86_64-linux-gnu/ -lmariadb -lrt -lcrypto -lcurl -lpthread -luuid -o p4
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o chart.o chart.c
g++ lib/db.o lib/dbdict.o lib/common.o lib/serial.o lib/thread.o lib/curl.o lib/json.o chart.o -lxml2 -L/usr/local/lib -l:libwebsockets.a -ljansson -lssl -lz -L/usr/lib/x86_64-linux-gnu/ -lmariadb -lrt -lcrypto -lcurl -lpthread -luuid -o dbchart
Alles anzeigen
make install
root@debian:/usr/src/linux-p4d# make install
if ! test -d /etc/p4d; then \
mkdir -p /etc/p4d; \
mkdir -p /etc/p4d/scripts.d; \
chmod a+rx /etc/p4d; \
fi
if ! test -f /etc/p4d/p4d.conf; then \
install --mode=644 -D ./configs/p4d.conf /etc/p4d/; \
fi
mkdir -p /etc/rsyslog.d
mkdir -p /etc/logrotate.d
install --mode=644 -D ./configs/p4d.dat /etc/p4d/;
if ! test -d /usr/local/bin; then \
mkdir -p "/usr/local/bin"; \
chmod a+rx /usr/local/bin; \
fi
install -D ./scripts/p4d-* /usr/local/bin/
install --mode=755 -D p4d /usr/local/bin
install --mode=755 -D p4 /usr/local/bin
make install-systemd
make[1]: Verzeichnis „/usr/src/linux-p4d“ wird betreten
cat contrib/p4d.service | sed s:"<BINDEST>":"/usr/local/bin":g | sed s:"<AFTER>":"":g | install --mode=644 -C -D /dev/stdin /etc/systemd/system/p4d.service
chmod a+r /etc/systemd/system/p4d.service
systemctl daemon-reload
systemctl enable p4d
Created symlink /etc/systemd/system/multi-user.target.wants/p4d.service → /etc/systemd/system/p4d.service.
make[1]: Verzeichnis „/usr/src/linux-p4d“ wird verlassen
(cd htdocs; make install)
make[1]: Verzeichnis „/usr/src/linux-p4d/htdocs“ wird betreten
if ! test -d /var/lib/p4; then \
mkdir -p "/var/lib/p4"; \
chmod a+rx "/var/lib/p4"; \
fi
if test -f "/var/lib/p4/stylesheet.css"; then \
cp -Pp "/var/lib/p4/stylesheet.css" "/var/lib/p4/stylesheet.css.save"; \
fi
cp -r ./* /var/lib/p4/
if test -f "/var/lib/p4/stylesheet.css.save"; then \
cp -Pp "/var/lib/p4/stylesheet.css.save" "/var/lib/p4/stylesheet.css"; \
fi
chmod -R a+r "/var/lib/p4"; \
chown -R www-data:www-data "/var/lib/p4"
make[1]: Verzeichnis „/usr/src/linux-p4d/htdocs“ wird verlassen
Alles anzeigen
Ja das hab ich alles, mit Ausnahme des erwähnten "Es heißt dass "libmariadbclient-dev" nicht verfügbar ist und durch "libmariadb-dev-compat" und "libmariadb-dev" ersetzt wurde. Diese beiden habe ich dann installiert."
Das bauen der "libwebsockets" hat nach deiner Anleitung weiter oben auch geklappt.
Was fange ich mit "pkg-config" an? Installiert isses jetzt.
Vielen Dank soweit.
Hast Du wirklich alle Pakete installiert, die in der Installationsanleitung angegeben sind (auch das Sprachpaket)?
Die Fehlermeldung sagt nur aus, daß es beim Linken einen Fehler gegeben hat. Dieser sollte weiter oben stehen. Ich würde vorschlagen, nicht in der VM Console zu arbeiten, sondern sich per SSH zu verbinden, damit Du nach oben scrollen kannst.
Es sind definitiv alle Pakete installiert auch das Sprachpaket de_DE.UTF-8.
Eine Sache bzgl. der Pakete ist allerdings aufgefallen. Es heißt dass "libmariadbclient-dev" nicht verfügbar ist und durch "libmariadb-dev-compat" und "libmariadb-dev" ersetzt wurde. Diese beiden habe ich dann installiert.
Für mich sind die folgenden Zeilen Bömische Dörfer. Zweimal "make: pkg-config: Datei oder Verzeichnis nicht gefunden" aber ich kann nicht raus finden was genau nicht gefunden wurde. Selbst wenn könnte ich das vermutlich nicht ohne hilf beheben.
Nen ganzen Haufen undifined references sind noch zu finden.
Ich musste die Meldung des macke clean all aufgrund der maximalen Postlänge noch deutlich kürzen, ich hoffe die wichtigen Teile sind geblieben.
root@debian:/usr/src/linux-p4d# make clean all
rm -f */*.o *.o core* *~ */*~ lib/t *.jpg
rm -f p4d dbchart p4 p4d-0.7.6.tgz
rm -f com2
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o lib/db.o lib/db.c
...
g++ -c -I/usr/include/libxml2 -ggdb -O0 -pthread -fPIC -std=c++17 -Wall -Wreturn-type -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wno-psabi -I/usr/include/mariadb -I/usr/include/mariadb/mysql -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -DUSEDB -DBIN_PATH='"/usr/local/bin"' -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DGIT_REV='"a95ad25"' -o p4d.o p4d.c
make: pkg-config: Datei oder Verzeichnis nicht gefunden
make: pkg-config: Datei oder Verzeichnis nicht gefunden
g++ lib/db.o lib/dbdict.o lib/common.o lib/serial.o lib/thread.o lib/curl.o lib/json.o lib/mqtt.o lib/mqtt_c.o lib/mqtt_pal.o main.o p4io.o service.o w1.o hass.o websock.o wsactions.o p4d.o -lxml2 -l:libwebsockets.a -lssl -lz -L/usr/lib/x86_64-linux-gnu/ -lmariadb -lrt -lcrypto -lcurl -lpthread -luuid -o p4d
/usr/bin/ld: lib/json.o: in function `json_decref':
/usr/include/jansson.h:133: undefined reference to `json_delete'
/usr/bin/ld: lib/json.o: in function `json2Data(json_t*, MemoryStruct*, char const*)':
/usr/src/linux-p4d/lib/json.c:24: undefined reference to `json_dumps'
/usr/bin/ld: lib/json.o: in function `addFieldToJson(json_t*, cDbValue*, int, char const*)':
/usr/src/linux-p4d/lib/json.c:57: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:57: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:62: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:62: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:66: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:66: undefined reference to `json_object_set_new'
/usr/bin/ld: lib/json.o: in function `getStringFromJson(json_t*, char const*, char const*)':
/usr/src/linux-p4d/lib/json.c:155: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:160: undefined reference to `json_string_value'
/usr/bin/ld: lib/json.o: in function `getBoolFromJson(json_t*, char const*, bool)':
/usr/src/linux-p4d/lib/json.c:165: undefined reference to `json_object_get'
/usr/bin/ld: lib/json.o: in function `getIntFromJson(json_t*, char const*, int)':
/usr/src/linux-p4d/lib/json.c:175: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:180: undefined reference to `json_integer_value'
/usr/bin/ld: lib/json.o: in function `getLongFromJson(json_t*, char const*, long)':
/usr/src/linux-p4d/lib/json.c:185: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:190: undefined reference to `json_integer_value'
/usr/bin/ld: lib/json.o: in function `getDoubleFromJson(json_t*, char const*, double)':
/usr/src/linux-p4d/lib/json.c:195: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:201: undefined reference to `json_integer_value'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:203: undefined reference to `json_real_value'
/usr/bin/ld: lib/json.o: in function `getObjectFromJson(json_t*, char const*, json_t*)':
/usr/src/linux-p4d/lib/json.c:208: undefined reference to `json_object_get'
/usr/bin/ld: lib/json.o: in function `jStringValid(char const*)':
/usr/src/linux-p4d/lib/json.c:218: undefined reference to `json_string'
/usr/bin/ld: lib/json.o: in function `addToJson(json_t*, char const*, char const*, char const*)':
/usr/src/linux-p4d/lib/json.c:234: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:237: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:239: undefined reference to `json_object_set_new'
/usr/bin/ld: lib/json.o: in function `addToJson(json_t*, char const*, long)':
/usr/src/linux-p4d/lib/json.c:244: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:244: undefined reference to `json_object_set_new'
/usr/bin/ld: lib/json.o: in function `addToJson(json_t*, char const*, int)':
/usr/src/linux-p4d/lib/json.c:249: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/lib/json.c:249: undefined reference to `json_object_set_new'
/usr/bin/ld: lib/json.o: in function `addToJson(json_t*, char const*, json_t*)':
/usr/src/linux-p4d/lib/json.c:254: undefined reference to `json_object_set_new'
/usr/bin/ld: hass.o: in function `json_decref':
/usr/include/jansson.h:133: undefined reference to `json_delete'
/usr/bin/ld: hass.o: in function `P4d::mqttPublishSensor(char const*, char const*, char const*, double, char const*, bool)':
/usr/src/linux-p4d/hass.c:89: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:92: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:92: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:94: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:94: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:96: undefined reference to `json_dumps'
/usr/bin/ld: hass.o: in function `P4d::jsonAddValue(json_t*, char const*, char const*, char const*, double, unsigned int, char const*, bool)':
/usr/src/linux-p4d/hass.c:115: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:119: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:123: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:134: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:134: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:136: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:136: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:145: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:145: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:146: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:146: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:151: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:154: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/hass.c:158: undefined reference to `json_object_set_new'
/usr/bin/ld: hass.o: in function `P4d::mqttWrite(json_t*, unsigned int)':
/usr/src/linux-p4d/hass.c:177: undefined reference to `json_dumps'
/usr/bin/ld: websock.o: in function `json_decref':
/usr/include/jansson.h:133: undefined reference to `json_delete'
/usr/bin/ld: websock.o: in function `cWebSock::callbackWs(lws*, lws_callback_reasons, void*, void*, unsigned long)':
/usr/src/linux-p4d/websock.c:601: undefined reference to `json_loadb'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:617: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:633: undefined reference to `json_dumps'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:644: undefined reference to `json_dumps'
/usr/bin/ld: websock.o: in function `cWebSock::atLogin(lws*, char const*, char const*, json_t*)':
/usr/src/linux-p4d/websock.c:713: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:715: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:718: undefined reference to `json_dumps'
/usr/bin/ld: websock.o: in function `cWebSock::atLogout(lws*, char const*, char const*)':
/usr/src/linux-p4d/websock.c:733: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:736: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:738: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/websock.c:740: undefined reference to `json_dumps'
/usr/bin/ld: wsactions.o: in function `json_decref':
/usr/include/jansson.h:133: undefined reference to `json_delete'
/usr/bin/ld: wsactions.o: in function `P4d::dispatchClientRequest()':
/usr/src/linux-p4d/wsactions.c:37: undefined reference to `json_loads'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:43: undefined reference to `json_object_get'
/usr/bin/ld: wsactions.o: in function `P4d::replyResult(int, char const*, long)':
/usr/src/linux-p4d/wsactions.c:180: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:181: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:181: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:182: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:182: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::performLogin(json_t*)':
/usr/src/linux-p4d/wsactions.c:198: undefined reference to `json_object_get'
...
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:975: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:976: undefined reference to `json_array_append_new'
...
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:992: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:992: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::performParEditRequest(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1104: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1105: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1105: undefined reference to `json_object_set_new'
...
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1115: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1115: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::performTimeParEditRequest(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1157: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1158: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1158: undefined reference to `json_object_set_new'
...
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1165: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1165: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::performParStore(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1186: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1225: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1225: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::performTimeParStore(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1326: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1327: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1327: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::performChartData(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1379: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1380: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1394: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1410: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1411: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1467: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::performUserConfig(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1559: undefined reference to `json_array'
/usr/bin/ld: wsactions.o: in function `P4d::resetPeaks(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1610: undefined reference to `json_object'
/usr/bin/ld: wsactions.o: in function `P4d::storeConfig(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1630: undefined reference to `json_object_iter'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1630: undefined reference to `json_object_iter_key'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1630: undefined reference to `json_object_key_to_iter'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1630: undefined reference to `json_object_iter_value'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1632: undefined reference to `json_string_value'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1633: undefined reference to `json_string_value'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1630: undefined reference to `json_object_key_to_iter'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1630: undefined reference to `json_object_iter_next'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1630: undefined reference to `json_object_iter_key'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1656: undefined reference to `json_object'
/usr/bin/ld: wsactions.o: in function `P4d::storeIoSetup(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1677: undefined reference to `json_array_size'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1677: undefined reference to `json_array_get'
/usr/bin/ld: wsactions.o: in function `P4d::storeGroups(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1724: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1731: undefined reference to `json_array_size'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1731: undefined reference to `json_array_get'
/usr/bin/ld: wsactions.o: in function `P4d::storeAlerts(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1806: undefined reference to `json_object_get'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1810: undefined reference to `json_array_size'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1810: undefined reference to `json_array_get'
/usr/bin/ld: wsactions.o: in function `P4d::storeChartbookmarks(json_t*, long)':
/usr/src/linux-p4d/wsactions.c:1857: undefined reference to `json_dumps'
/usr/bin/ld: wsactions.o: in function `P4d::performChartbookmarks(long)':
/usr/src/linux-p4d/wsactions.c:1871: undefined reference to `json_loads'
/usr/bin/ld: wsactions.o: in function `P4d::config2Json(json_t*)':
/usr/src/linux-p4d/wsactions.c:1891: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1891: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::configDetails2Json(json_t*)':
/usr/src/linux-p4d/wsactions.c:1910: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1911: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1913: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1913: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1914: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1914: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1915: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1915: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1916: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1916: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1917: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1917: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1927: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1927: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::configChoice2json(json_t*, char const*)':
/usr/src/linux-p4d/wsactions.c:1944: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1953: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1953: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1957: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1970: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1979: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1979: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1983: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:1998: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2007: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2007: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2011: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2026: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2035: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2035: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2039: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2046: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2058: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2063: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2063: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2064: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2064: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2065: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2073: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2077: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2081: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2082: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2082: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2083: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2083: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2084: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2087: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::userDetails2Json(json_t*)':
/usr/src/linux-p4d/wsactions.c:2101: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2102: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2104: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2104: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2105: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2105: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::valueFacts2Json(json_t*, bool)':
/usr/src/linux-p4d/wsactions.c:2126: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2127: undefined reference to `json_array_append_new'
...
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2146: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2146: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::groups2Json(json_t*)':
/usr/src/linux-p4d/wsactions.c:2167: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2168: undefined reference to `json_array_append_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2170: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2170: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2171: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2171: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::daemonState2Json(json_t*)':
/usr/src/linux-p4d/wsactions.c:2191: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2191: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2192: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2192: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2193: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2193: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2194: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2194: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2195: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2195: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2196: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2196: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::s3200State2Json(json_t*)':
/usr/src/linux-p4d/wsactions.c:2203: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2203: undefined reference to `json_object_set_new'
...
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2209: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2209: undefined reference to `json_object_set_new'
/usr/bin/ld: wsactions.o: in function `P4d::sensor2Json(json_t*, cDbTable*)':
/usr/src/linux-p4d/wsactions.c:2227: undefined reference to `json_integer'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2227: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2241: undefined reference to `json_integer'
...
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2256: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/wsactions.c:2256: undefined reference to `json_object_set_new'
/usr/bin/ld: p4d.o: in function `json_decref':
/usr/include/jansson.h:133: undefined reference to `json_delete'
/usr/bin/ld: p4d.o: in function `json_array_append':
/usr/include/jansson.h:271: undefined reference to `json_array_append_new'
/usr/bin/ld: p4d.o: in function `P4d::pushOutMessage(json_t*, char const*, long)':
/usr/src/linux-p4d/p4d.c:208: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:211: undefined reference to `json_object_set_new'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:213: undefined reference to `json_dumps'
/usr/bin/ld: p4d.o: in function `P4d::pushDataUpdate(char const*, long)':
/usr/src/linux-p4d/p4d.c:239: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:241: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:245: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:281: undefined reference to `json_array'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:283: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:287: undefined reference to `json_object'
/usr/bin/ld: p4d.o: in function `P4d::update(bool, long)':
/usr/src/linux-p4d/p4d.c:2031: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:2052: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:2055: undefined reference to `json_object'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:2076: undefined reference to `json_real'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:2076: undefined reference to `json_object_set_new'
...
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:2234: undefined reference to `json_string'
/usr/bin/ld: /usr/src/linux-p4d/p4d.c:2234: undefined reference to `json_object_set_new'
/usr/bin/ld: p4d.o: in function `P4d::dispatchMqttCommandRequest(char const*)':
/usr/src/linux-p4d/p4d.c:2412: undefined reference to `json_loads'
collect2: error: ld returned 1 exit status
make: *** [Makefile:54: p4d] Fehler 1
Alles anzeigen
Hab jetzt auch auf die debian 11 umgestellt. Das lief bis zum make clean all des p4d ohne Fehler durch.
make clean all hat jedoch einen Fehler gemeldet.
collect2: error: id returned 1 exit status
make: *** [Makefile:54: p4d] Fehler 1
Mehr wird dazu leider nicht ausgegeben. In der VM kann ich auch nicht "nach oben" scrollen und suchen. Ein Logfile wird nicht zufällig erzeugt?
Was kann das sein?
Wenn die Version erstmal läuft, dürfte ja nicht mehr viel passieren.
Oh verdammt, klar, build-essential kam ja erst nach den libwebsockets und hatte ich demnach noch nicht drauf.
Ich werd mich nochmal dran setzen. Ich glaube ich geh dann auch gleich auf die 11er debian. Wenn das bei dir läuft sollte es ja gundsätzlich klappen.
Soweit so gut, irgendwie.
Ich hab die 10.9.0 nun am laufen, jedoch scheitert es dieses mal schon am cmake der libwebsockets. No CMAKE_CXX_COMPILER could be found was scheinbar soviel heißt, als dass cmake keinen Kompiler findet. Wo bekomme ich den nun her? Oder soll ich besser mit debian 11 probieren? Welche Version vernwendest du, oder ist die Version der 11er egal?
Danke für den Tipp. Dann versuche ich mal eine neuere Version.
muss ja auch zur Distri passen, das wären sehr viele Versionen des Package, daher baue ich das aktuell nur für Raspian Buster was im Moment von den meisten verwendet wird.
zur libwebsock. Wirf die Package al runter und mach das:
Codegit clone https://libwebsockets.org/repo/libwebsockets cd libwebsockets mkdir build cd build cmake .. make make install ldconfig
dann beim p4d nochmal make clean all
Moin zusammen,
nachdem ich nun über viele Jahre p4d, nach einigen Startschwierigkeiten, auf einem Raspi laufen hatte, muss er nun auf einen debian 9.5.0 Server mit Intel Architektur umziehen. Diese debian Version, da ich nicht sicher bin ob die VM eine neuere Version zu lässt, kann ich aber probieren wenn es daran liegen könnte.
Soweit erstmal nicht schlimm, leider komme ich jedoch nicht weiter. Ich komme bis zum make clean all, welches mit den Fehlern error == CR_STMT_CLOSED und error == CR_CONN_UNKNOWN_PROTOCOL abbricht.
Ich habe als erstes versucht analog zum Post 1359 die CFLAGS in Make.config an zu passen, allerdings sah die Make.config bei mir Komplett anders aus, sodass ich da lieber die Finger von gelassen habe.
Als nächstes habe ich die libwebsockets nach obiger Anleitung gebaut, was auch durch gelaufen ist. Leider bricht das make clean all trotzdem weiterhinmit den beiden obigen Fehlern ab. Hab nen Screenshot mit dem gesamten Vorgang angehängt. Vielleicht hilft das.
Habt ihr ne Idee was ich noch machen kann?
Grüße Mathias
Moin zusammen,
nachdem alles jetzt einige Zeit sauber lief habe ich mir ein anderes NAS gekauft, welches mysql nativ unterstützt und ich so den Umweg über das mounten der Ordner nicht mehr gehen muss.
Da ich nicht mehr genau weiß was ich alles angepasst habe, dachte ich mir das einfachste wäre eine Neuinstallation.
Soweit so gut, jedoch scheint leider wieder etwas beim Ausführen der install.sh schief zu gehen.
Beim Pakete installieren läuft er auf einen Fehler. Sieht so aus als ob er das Paket libmysqlclient-dev nicht (mehr) findet und es scheinen bei dem mysql-server-5.5 Paket abhänige zu fehlen, die nicht mit installiert werden.
Pakete Installieren
+ apt-get -qy install apache2 php5 php5-mysql php5-gd build-essential libssl-dev git
Paketlisten werden gelesen...
Abhängigkeitsbaum wird aufgebaut....
Statusinformationen werden eingelesen....
build-essential ist schon die neueste Version (12.3).
git ist schon die neueste Version (1:2.11.0-3+deb9u2).
libssl-dev ist schon die neueste Version (1.1.0f-3).
Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass
Sie eine unmögliche Situation angefordert haben oder, wenn Sie die
Unstable-Distribution verwenden, dass einige erforderliche Pakete noch
nicht erstellt wurden oder Incoming noch nicht verlassen haben.
Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:
Die folgenden Pakete haben unerfüllte Abhängigkeiten:
php5-mysql : Hängt ab von: libmysqlclient18 ist aber nicht installierbar
E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.
+ apt-get -qy install mysql-server-5.5 libmysqlclient-dev
Paketlisten werden gelesen...
Abhängigkeitsbaum wird aufgebaut....
Statusinformationen werden eingelesen....
Paket libmysqlclient-dev ist nicht verfügbar, wird aber von einem anderen Paket
referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
wurde oder nur aus einer anderen Quelle verfügbar ist.
Doch die folgenden Pakete ersetzen es:
mysql-server-5.5
E: Für Paket »libmysqlclient-dev« existiert kein Installationskandidat.
Durch die folgende mysql Routine läuft er zwar durch, jedoch ohne die Möglichkeit ein Passwort einzugeben und mit diversen Fehlermeldungen.
Hier die Meldungen falls notwendig:
+ green_msg 'root passwort von mysql eingeben...'
+ echo -e '\033[32;1mroot passwort von mysql eingeben...\033[0m'
root passwort von mysql eingeben...
+ CMD='CREATE DATABASE p4 charset utf8; CREATE USER '\''p4'\''@'\''localhost'\'' IDENTIFIED BY '\''p4'\''; GRANT ALL PRIVILEGES ON p4.* to '\''p4'\''@'\''localhost'\'';'
+ mysql -u root -p -e 'CREATE DATABASE p4 charset utf8; CREATE USER '\''p4'\''@'\''localhost'\'' IDENTIFIED BY '\''p4'\''; GRANT ALL PRIVILEGES ON p4.* to '\''p4'\''@'\''localhost'\'';'
./install.sh: Zeile 51: mysql: Kommando nicht gefunden.
+ green_msg 'p4d Installieren'
+ echo -e '\033[32;1mp4d Installieren\033[0m'
p4d Installieren
+ cd /p4d
+ git clone https://github.com/horchi/linux-p4d/
Klone nach 'linux-p4d' ...
remote: Counting objects: 2852, done.
remote: Total 2852 (delta 0), reused 0 (delta 0), pack-reused 2852
Empfange Objekte: 100% (2852/2852), 2.62 MiB | 278.00 KiB/s, Fertig.
Löse Unterschiede auf: 100% (2130/2130), Fertig.
+ cd linux-p4d
+ make
make: mysql_config: Kommando nicht gefunden
g++ -c -ggdb -O0 -fPIC -Wreturn-type -Wall -Wno-parentheses -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DPLGDIR='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DUSEMD5 -DGIT_REV='"78ae588"' -o lib/db.o lib/db.c
lib/db.c:9:20: fatal error: errmsg.h: Datei oder Verzeichnis nicht gefunden
#include <errmsg.h>
^
compilation terminated.
Make.config:53: die Regel für Ziel „lib/db.o“ scheiterte
make: *** [lib/db.o] Fehler 1
+ make install
make: mysql_config: Kommando nicht gefunden
g++ -c -ggdb -O0 -fPIC -Wreturn-type -Wall -Wno-parentheses -Wformat -pedantic -Wunused-variable -Wunused-label -Wunused-value -Wunused-function -Wno-long-long -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -D_GNU_SOURCE -DTARGET='"p4d"' -DLOG_PREFIX='""' -DPLGDIR='""' -DUSEUUID -DUSEMD5 -DUSELIBXML -DUSELIBARCHIVE -DUSEJSON -DUSEGUNZIP -D_GNU_SOURCE -DTARGET='"p4d"' -DDEAMON=P4d -DUSEMD5 -DGIT_REV='"78ae588"' -o lib/db.o lib/db.c
lib/db.c:9:20: fatal error: errmsg.h: Datei oder Verzeichnis nicht gefunden
#include <errmsg.h>
^
compilation terminated.
Make.config:53: die Regel für Ziel „lib/db.o“ scheiterte
make: *** [lib/db.o] Fehler 1
+ cp contrib/p4d /etc/init.d/
+ cp contrib/runp4d /usr/local/bin/
+ cp htdocs/alertcfg.php htdocs/basecfg.php htdocs/base.css htdocs/chart2.php htdocs/chart.php htdocs/config.php htdocs/detail.php htdocs/error.php htdocs/err.php htdocs/footer.php htdocs/functions.php htdocs/header.php htdocs/hmcfg.php htdocs/img htdocs/index.php htdocs/jfunctions.js htdocs/jfunctions.php htdocs/LICENSE htdocs/login.php htdocs/logout.php htdocs/main.php htdocs/menu.php htdocs/normalize.css htdocs/schemacfg.php htdocs/schemadsp.php htdocs/schema.php htdocs/scriptcfg.php htdocs/settings.php htdocs/setup.php htdocs/stylesheet-blue.css htdocs/stylesheet.css htdocs/stylesheet-dark.css htdocs/stylesheet-yellow.css htdocs/test.php /var/www/
cp: das angegebene Ziel '/var/www/' ist kein Verzeichnis
+ chmod 750 /etc/init.d/p4d
+ update-rc.d p4d defaults
+ green_msg 'pchart Installieren'
+ echo -e '\033[32;1mpchart Installieren\033[0m'
pchart Installieren
+ cd /tmp
+ wget http://www.pchart.net/release/pChart2.1.4.tar.gz
--2017-10-12 12:46:16-- http://www.pchart.net/release/pChart2.1.4.tar.gz
Auflösen des Hostnamens »http://www.pchart.net (http://www.pchart.net)« … 137.74.162.67
Verbindungsaufbau zu http://www.pchart.net (http://www.pchart.net)|137.74.162.67|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 975553 (953K) [application/x-gzip]
Wird in »»pChart2.1.4.tar.gz«« gespeichert.
pChart2.1.4.tar.gz 100%[==============================================>] 952,69K 337KB/s in 2,8s
2017-10-12 12:46:19 (337 KB/s) - »»pChart2.1.4.tar.gz«« gespeichert [975553/975553]
+ tar -xvzf pChart2.1.4.tar.gz -C /var/www/
tar: /var/www: Funktion open fehlgeschlagen: Datei oder Verzeichnis nicht gefunden
tar: Error is not recoverable: exiting now
+ ln -s /var/www/pChart2.1.4/ /var/www/pChart
ln: die symbolische Verknüpfung '/var/www/pChart' konnte nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
+ chmod 777 /var/www/pChart/cache
chmod: Zugriff auf '/var/www/pChart/cache' nicht möglich: Datei oder Verzeichnis nicht gefunden
+ chown www-data /var/www
chown: Zugriff auf '/var/www' nicht möglich: Datei oder Verzeichnis nicht gefunden
+ green_msg '--------------------------
Installation Abgeschlossen
--------------------------'
+ echo -e '\033[32;1m--------------------------
Installation Abgeschlossen
--------------------------\033[0m'
--------------------------
Installation Abgeschlossen
--------------------------
root@froeling:/tmp# apt-get install apache2 php5 php5-mysql php5-gd build-essential libssl-dev git
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
build-essential ist schon die neueste Version (12.3).
git ist schon die neueste Version (1:2.11.0-3+deb9u2).
libssl-dev ist schon die neueste Version (1.1.0f-3).
Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass
Sie eine unmögliche Situation angefordert haben oder, wenn Sie die
Unstable-Distribution verwenden, dass einige erforderliche Pakete noch
nicht erstellt wurden oder Incoming noch nicht verlassen haben.
Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:
Die folgenden Pakete haben unerfüllte Abhängigkeiten:
php5-mysql : Hängt ab von: libmysqlclient18 ist aber nicht installierbar
E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.
Alles anzeigenInstallation P4d unter Jessie (nicht so kurz, wie Syncro es sich wünscht, aber hoffentlich hilfreich) - bitte nicht für wheezy verwenden!
Ich gebe gern wieder, was ich gemacht habe. Ich komme aber aus der Windows-Welt und verwende daher wo es geht ein GUI, so auch hier.
Ich verwendete das derzeit neueste Jessie Betriebssystem für den Raspi vom 2.3.2017.
Bildschirm, Tastatur, Maus und Netzwerk anstecken.
Nach dem Boot von jessie die übliche Einrichtung von boot zum Desktop,Sprache, Zeitzone, Tastatur und Wifi-Standard. Eigenes pi Passwort (default = raspberry, Achtung wenn Keyboard noch englisch ist mit z als y).
Wenn man WLAN verwenden will, dann rechts oben in der Ecke am Schirm das WLAN aktivieren.
Über das LX-Terminal dann durch Eingabe von
sudo ifconfig
auslesen, welche IP-Adresse man vom DHCP am Router erhalten hat, (Netzwerk oder WLAN) und aufschreiben. Eventuell auch gleich die MAC-Adresse des eth0 interfaces um sie beim Router für eine fixe Adressvergabe verwenden zu können.
Danach über das LX-terminal: die Anmeldung unter root erlauben durch Eingabe eines root Passworts. (wer Wert legt auf hohe Sicherheit soll das lassen und halt jeweils sudo verwenden)
sudo passwd root
Ich verwende als klassischer Windows Anwender gerne den Remotedesktop (mstsc) und installiere das Notwendige am Raspi wie folgt (vnc beißt sich und muss deinstalliert werden) :
sudo apt-get purge realvnc-vnc-server
sudo apt-get install xrdp
Danach den Raspi herunterfahren und an seinem vorgesehenen Platz platzieren, anstecken des USB-FDDI Konverters (seriell) sowie Stromversorgung und Netzwerkkabel (oder WLAN). Danach wieder in Betrieb nehmen.
Mit der Remotedesktopverbindung (mstsc) am PC und der vorher notierten IP-Adresse zunächst mit dem Benutzer pi, oder gleich mit root am Raspi anmelden.
Im LX-Terminal dann folgendes durchführen:
sudo apt-get install libxml2.dev
sudo apt-get install libssl-dev
sudo apt-get install libcurl4-openssl-dev
wget hungerphilipp.de/files/p4d/install.sh
sudo chmod +x install.sh
./install.sh
entsprechende Fragen bezüglich zu setzendes SQL usw. Passwort beantworten
mit
sudo nano /etc/p4d/p4d.conf
die Zeile ttyDeviceSvc = /dev/ttyUSB1 auf ttyDeviceSvc = /dev/ttyUSB0 ausbessern.
------------------------------------------------------------------
Für die Verwendung der Mail ist folgendes notwendig:
sudo apt-get install ssmtp mailutils
sudo aptitude remove heirloom-mailx
Die Datei /etc/ssmtp/revaliases ist zu editieren und folgender dem jeweiligen Provider entsprechender Eintrag zu machen. In meinem Fall ist es all-inkl. Alle folgenden Zeilen dürfen kein # davor haben.
Root:heizung:wxxxxxxx.kasserver.com:25 (=smtp Server oder Mailabgabeserver des Providers
Die Datei /etc/ssmtp/ssmtp.conf wie folgt je nach Provider zu ändern. In meinem Fall wieder all-inkl. Alle folgenden Zeilen dürfen kein # davor haben.
Root=postmaster
Mailhub=wxxxxxxx.kasserver.com:587 (=smtp Server oder Mailabgabeserver des Providers)
rewriteDomain=mydomain.xxx (=nur Domain ohne @ und Namen davor)
hostname=heizungraspi (nach belieben)
UseSTARTTLS=YES
AuthUser=Mailanmeldebenutzer beim Provider
AuthPass=Mailanmeldepasswort beim Provider (Achtung beim Passwort sind keine Sonderzeichen möglich – Fehler im Mailprogramm)
------------------------------------------------------------------
Ich meldete mich dann vom Raspi ab und mit root wieder an um den Dateimanager am Raspi unter root Rechten zu verwenden, andere mögen dass mit sudo und cp … usw. machen.
Ich verschob dann mit dem Dateimanager alles außer das Verzeichnis html aus dem Verzeichnis /var/www in das Verzeichnis /var/www/html
Weiters benannte ich das Verzeichnis /var/www/html/pChart2.1.4 in /var/www/html/pChart um.
Andere werden das mit einem symbolic Link realisieren.
Danach kopierte ich mit dem Dateimanager das Verzeichnis /p4d/linux-p4d/htdocs/img nach /var/www/html
Danach wieder über das X-Terminal
sudo chmod 777 /var/www/pChart/cache
sudo chown -R www-data /var/www
----------------------------------------------------
Will man die MySQL-Datenbank am Raspi lassen dann braucht man die nächsten Dinge bis zum Reboot des Raspi nicht machen
Ansonsten ist folgendes zu erledigen:
Auf einem anderen Gerät: Windows, NAS, anderer Linux-Rechner etc. MySQL oder auch MariaDB installieren. Ein Wartungstool für die Datenbank installieren (z.B. phpmyadmin) mit diesem eine Datenbank namens p4 und dem Zeichensatz/Collating sequenz: utf8mb4_general_ci anlegen, einen Benutzer mit dem Namen p4 mit dem „Hostnamen“ % = Zugriff von Überall, nicht nur localhost, anlegen und ihm alle Rechte geben. Das Passwort p4 verwenden. Die IP-Adresse des Datenbankservers aufschreiben.
Sollte irgendwo eine Firewall in Funktion sein, so muss Port 3306 für TCP erlaubt werden, so es nicht eh schon ist.
Nun wieder zurück zum Raspi:
In der Datei /var/www/html/config.php unter $mysqlhost statt „localhost“ die zuvor ermittelte IP-Adresse des Datenbankservers eintragen.
In der Datei /etc/p4d/p4d.conf unter DbHost statt localhost die IP-Adresse des Datenbankservers eintragen.
----------------------------------------------------
Nun kann der Raspi neu gestartet werden,
Danach in das Web einsteigen mit „raspi-ip-adresse/index.php“
Danach anmelden unter login:
Zunächst mit Benutzer p4 und Passwort p4-3200
Nun unter Setup-Aufzeichnung einmal Init aufrufen. Danach die Werte auswählen die aufgezeichnet und unter Aktuell angezeigt werden sollen (Kesseltemperatur, Außentemperatur, Vorlauf-Ist-Temperatur usw.)
Danach auf Speichern
Danach auf Menü und dort auf init.
Danach aktualisieren
In Setup-Allg. Konfiguration kann noch das Passwort für das Login auf der Webseite geändert, als auch die Maileinträge angepasst werden: Mit Mail-Benachrichtigung ankreuzen, ev. HTML-Mail und zweimal seine Mailadresse angeben.
Das Auslösen einer Status Mail mit Werten (nur die Zahlen) wie folgt, getrennt durch Komma, konfigurieren. Es wird nur bei einem Wechsel in einen anderen Status, so er angeführt ist, eine Mail gesendet:
1=Kessel aus, 2=Anheizen, 3=Heizen, 4=Feuererhaltung, 7=Vorbereitung, 8=Vorwärmen, 9=Zünden, 11=Abstellen Warten1, 12=Abstellen Einschub1, 13=Abstellen Warten2, 14=Abstellen Einschub2, 15=Abreinigen, 19=Betriebsbereit
Mit "Test Mail" sollte eine Mail ankommen, wenn alles richtig eingestellt ist.
Und wenn ich nichts vergessen habe so sollte jetzt alles laufen. Für horchi wird sicher einiges unfachmännisch sein, was ich da schrieb, aber so habe ich es zumindest zum Laufen gebracht. Das mit dem Umbenennen des pChart Verzeichnisses ist vielleicht kontraproduktiv wenn man später Updates machten will, aber wenn das horchi mit dem symbolic link genauer unter Berücksichtigung des anderen Verzeichnisses unter jessie erklärt und wo dieser symbolic link genau platziert werden muss, so werde ich es auch ändern.
Zum Fehlersuchen bietet sich die Einsicht in das syslog wie folgt an:
sudo tail -f /var/log/syslog
Gruß Robert
Moin zusammen,
wenn ich nach diesem Plan vorgehe, habe ich anfänglich das Gleiche wie vorher. Alles läuft, bis auf das Thema Charts.
Ich habe den PI jetzt einige Tage nicht mehr angefasst, da ich auf Dienstreise war und erstaunlicherweise sind die Charts jetzt da...
Grüße Mathias
horchi, wie wollen wir weiter machen? Soll ich doch lieber neu installieren? Irgendwas scheint bei mir ja nicht korrekt gelaufen zu sein.
rjiranek, kannst du kurz beschreiben wie du vorgegangen bist?
Horchi, ich habs geschafft. Hab heute einen guten Tag erwischt (neue SD Karte in meinem Haufen gefunden) . Alles neu auf dem Raspi 3 mit Jessie. Sogar das neueste Jessie diesmal ohne Problem. Die Datenbank habe ich auf dem Synology NAS. Diesmal klappte alles, ink. Mail, Graph, init.d., Außentemperatur - einfach alles nach Wunsch.
Mein einziger Kampf war dann, dem Ding letztlich jene fixe IP zu verpassen, die in meine Vorstellung passt. Was ich immer sonst machte, wollte einfach nicht - er hatte immer die gleiche IP, egal ob ich am Router im DHCP oder im networks File als static eintrug, er ging von der zuerst bekommenen IP einfach nicht weg. Letztlich habe ich den sogenannten NetworkManager installiert - mit dem machte er endlich was ich wollte.
Danke noch für deine viele Mühe mit dem Programm!!!
Ja, die SD-Karten sind wirklich häufig ein Problem. Fing bei mir auch so an. Hatte eine etwas ältere SD Karte genommen und nur Probleme gehabt. Neue SD-Karte und alles lief Problemlos.
Hi Syncro20VTurbo,
dann kann das WEBIF aus dem PHP Code heraus die Datenbank nicht mehr erreichen, ist di noch da und ansonsten erreichbar?
PHP5 ist auch kein Problem, hatte ich auch bis vor ~6 Wochen. Ggf klemmt das mit der oben genannten pChart Version, um da anzusetzen muss aber erstmal der rest bei dir zuverlässig und rund laufen.
Keine Ahnung was da immer mit mysql passiert, mysql ist wenn erstmal eingerichtet normalerweise rock-stable
Moin horchi,
"mysql -u p4 -pp4 -Dp4" meldet alles ok.
Aufm PI sind die Ordner ebenfalls identisch mit denen auf dem NAS und erreichbar.
Über die alte url 192.168.178.100/main.php, also ohne p4 läuft alles weiterhin problemlos, bis auf die Charts. Also ein grundsätzliches Datenbankproblem kann es ja eigentlich nicht sein oder?
Hilft das weiter?
Grüße Mathias
Vielleicht noch eine Info die für dich interessant sein könnte horchi:
Über Nacht hat sich etwas verändert und unter http://192.168.178.100/p4/main.php wird jetzt
Not Found
The requested URL /p4/main.php was not found on this server.
Apache/2.4.10 (Raspbian) Server at 192.168.178.100 Port 80
angezeigt.
Das Errorlog des Apache zeigt dies:
[Sun Mar 12 06:25:18.341715 2017] [mpm_prefork:notice] [pid 862] AH00163: Apache/2.4.10 (Raspbian) configured -- resuming normal operations
[Sun Mar 12 06:25:18.342031 2017] [core:notice] [pid 862] AH00094: Command line: '/usr/sbin/apache2'
[Sun Mar 12 10:05:07.829824 2017] [mpm_prefork:notice] [pid 862] AH00169: caught SIGTERM, shutting down
[Sun Mar 12 10:06:05.497714 2017] [mpm_prefork:notice] [pid 861] AH00163: Apache/2.4.10 (Raspbian) configured -- resuming normal operations
[Sun Mar 12 10:06:05.515390 2017] [core:notice] [pid 861] AH00094: Command line: '/usr/sbin/apache2'
[Sun Mar 12 10:06:51.527737 2017] [:error] [pid 1075] [client 192.168.178.158:54292] PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socke$
Da ich das mit dem Hintergrundbild immer noch nicht hinbekommen habe, werfe ich das hier auch nochmal in den Raum. Wie kann ich mein Heizungsschema (wieder) integrieren?