I just re-imaged my Raspberry Pi 4 with Manjaro and trying to run the dwservice script which has worked fine in the past and its failing. Any guidance would be appreciated.
Operating System: Manjaro ARM
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.1.58-5-MANJARO-RPI4 (64-bit)
Graphics Platform: Wayland
Processors: 4 × ARM Cortex-A72
Memory: 7.6 GiB of RAM
Graphics Processor: V3D 4.2
Product Name: Raspberry Pi 4 Model B Rev 1.4
[root@maia ~]# chmod +x dwagent.sh
[root@maia ~]# ./dwagent.sh
Error: Missing or Invalid Python. Required version 3.6+ or 2.7. Try to use -pypath
[root@maia ~]# python -V
Python 3.11.5
If you mean the shell file from here: https://www.dwservice.net/ Then it checks for python3, not python.
What says: python3 --version
?
Quote:
check_py_ver(){
if [ "$1" ]; then
if [ -f "$1" ]; then
PYVER=$($1 --version 2>&1)
PYV=$(echo $PYVER | sed 's/.* \([0-9]\).\([0-9]*\).*/\1\2/')
if [ "$PYV" -ge "36" ] || [ "$PYV" -eq "27" ]; then
echo "$PYVER"
return 0
fi
fi
fi
return 1
}
if [ "$1" = "-pypath" ]; then
PYPTH=$2
check_py_ver $PYPTH
if [ "$?" = "1" ]; then
echo "Error: Missing or Invalid Python. Required version 3.6+ or 2.7. Try to use -pypath <path>"
exit 1
fi
else
PYPTH=$(which "python3" 2>/dev/null)
check_py_ver $PYPTH
if [ "$?" = "1" ]; then
PYPTH=$(which "python2.7" 2>/dev/null)
check_py_ver $PYPTH
if [ "$?" = "1" ]; then
echo "Error: Missing or Invalid Python. Required version 3.6+ or 2.7. Try to use -pypath <path>"
exit 1
fi
fi
fi
Thanks for that. I should have checked the script. I am still getting some errors and at this point I think dwservice may need to update their script. Let me know if you have any ideas.
[root@maia ~]# python3 ./dwagent.sh
File “/root/./dwagent.sh”, line 57
cacerts.pem
SyntaxError: source code cannot contain null bytes
root@maia ~]# sed -i ‘s/\x0//g’ dwagent.sh
[root@maia ~]# python3 ./dwagent.sh
File “/root/./dwagent.sh”, line 57
cacerts.pem0000644000175000017500000002545314113401240012472 0ustar webdelwebdel-----BEGIN CERTIFICATE-----
^
SyntaxError: invalid decimal literal
./dwagent.sh -pypath /usr/bin/python

that worked but…
- Install
- Run
- I do not accept
Option (3): 1
Waiting…
Select the installation path:
Path (/usr/share/dwagent):
Waiting…
Do you want to install DWAgent to ‘/usr/share/dwagent’?
- Yes
- No
Option (2): 1
Waiting…
Folder creation…
Downloading file config.xml…
Downloading file files.xml…
Downloading file agentupd_linux_arm64_v1.zip…
Downloading file agent.zip…
Downloading file agentui.zip…
Downloading file agentapps.zip…
Downloading file agentui_linux_arm64_v1.zip…
Downloading file agentlib_linux_arm64_v1.zip…
Copying files…
Installing service…
Error: Service installation failed.
Press enter to continue.
Isn’t it obvious that you need root permissions to install it there? I wonder why it does not trigger a prompt like with sudo or pkexec.
I have been running as root. if you try to run it as user this is what you get.
- Install
- Run
- I do not accept
Option (3): 1
Waiting…
You must have root privileges to install DWAgent.
Please run the script with sudo or as root.**
Well then the developer will know more. If a log was written, then send it to them.
yep, I was looking for a install log. I did notice that if you select the “Run” option it works.