erste Installation und habe diesen Fehler erhalten:
discourse-setup: line 260: *0: syntax error: operand expected (error token is "*0")
Hostname für Ihr Discourse? [discourse.example.com]:
Irgendwelche Vorschläge, was schief gelaufen ist?
erste Installation und habe diesen Fehler erhalten:
discourse-setup: line 260: *0: syntax error: operand expected (error token is "*0")
Hostname für Ihr Discourse? [discourse.example.com]:
Irgendwelche Vorschläge, was schief gelaufen ist?
Hallo, willkommen zurück!
Können Sie detailliert angeben, mit welchem Betriebssystem Sie versuchen, Discourse zu installieren?
Hallo! Dies ist Ubuntu 20.04.6 LTS
Linux ubuntu 5.4.0-1082-raspi aarch64 aarch64 aarch64 GNU/Linux
Ich würde vorschlagen, mit einem git pull zu beginnen. Und wenn das Skript dann immer noch dieses Problem verursacht, versuchen Sie vielleicht stattdessen bash -vx ./discourse-setup, und wir können vielleicht sehen, was passiert. (Ich sehe nicht, wie Zeile 260 dieses Problem verursachen könnte)
die Zeile in 260:
avail_cores=$((`awk '/cpu cores/ {print $4;exit}' /proc/cpuinfo`*`sort /proc/cpuinfo | uniq | grep -c "physical id"`))
Ausgabe von bash -x:
scale_ram_and_cpu
+ scale_ram_and_cpu
+ local changelog=/tmp/changelog.11937
+ avail_gb=0
+ avail_cores=0
++ check_OS
+++ uname -s
++ echo Linux
+ os_type=Linux
+ '[' Linux == Darwin ']'
++ check_linux_memory
+++ free -m --si
+++ awk ' /Mem:/ {print $2}'
++ mem=3975
++ '[' 3975 -ge 990 -a 3975 -lt 1000 ']'
+++ free -g --si
+++ awk ' /Mem:/ {print $2} '
++ echo 3
+ avail_gb=3
++ awk '/cpu cores/ {print $4;exit}' /proc/cpuinfo
++ sort /proc/cpuinfo
++ uniq
++ grep -c 'physical id'
./discourse-setup: line 260: *0: syntax error: operand expected (error token is "*0")
cat /proc/cpuinfo:
root@ubuntu:/var/discourse# cat /proc/cpuinfo
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
Hardware : BCM2835
Revision : c03112
Serial : 10000000d0894f90
Model : Raspberry Pi 4 Model B Rev 1.2
Hier gibt es mehrere Möglichkeiten, denke ich. Vielleicht würde ich Folgendes wählen:
avail_cores=$((`lscpu --parse=core | awk 'NF==1' | sort -u | wc -l`))
(wir versuchen, die Gesamtzahl der aktuell aktiven physischen Kerne zu ermitteln – nicht logische Kerne, CPUs, Sockets oder Prozessoren)
Würde das in Ihrem Fall funktionieren?
ja – es gibt 4 zurück
also vielleicht besser lscpu anstelle des Parsens von /proc/cpuinfo verwenden
Großartig – ich habe einen PR eingereicht
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.