Arduino IDE 1.8.19 failure to compile, with buf[DOUBLE_BUF_SIZE] error

I'm using the Arduion IDE V1.8.19 on a Raspberry Pi 5 with an Arduino Uno R3 attached via USB. Also have the same error with an Arduino Mega 2560. Both Arduinos work just fine when attached via USB to my Windows PC. Trying to compile any sketch (even the simple basic one), fails with buf[DOUBLE_BUF_SIZE] error. I have a file with the verbose error, but cannot submit it because I'm new here...

Don't submit it, just include it with the <CODE/> formatting tool.

void setup() {
  Serial.begin(115200);
  Serial.println("Like this!");
}
void loop() {}

Here is the verbose error output:

Arduino: 1.8.19 (Linux), Board: "Arduino UNO"











arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -tools /usr/share/arduino/hardware/tools/avr -libraries /home/dik/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10819 -build-path /tmp/arduino_build_689430 -warnings=none -build-cache /tmp/arduino_cache_801434 -prefs=build.warn_data_percentage=75 -verbose /usr/share/arduino/examples/01.Basics/BareMinimum/BareMinimum.ino
arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -tools /usr/share/arduino/hardware/tools/avr -libraries /home/dik/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10819 -build-path /tmp/arduino_build_689430 -warnings=none -build-cache /tmp/arduino_cache_801434 -prefs=build.warn_data_percentage=75 -verbose /usr/share/arduino/examples/01.Basics/BareMinimum/BareMinimum.ino
Using board 'uno' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Using core 'arduino' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Detecting libraries used...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_689430/sketch/BareMinimum.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_689430/sketch/BareMinimum.ino.cpp" -o "/tmp/arduino_build_689430/preproc/ctags_target_for_gcc_minus_e.cpp"
"/usr/bin/arduino-ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/arduino_build_689430/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_689430/sketch/BareMinimum.ino.cpp" -o "/tmp/arduino_build_689430/sketch/BareMinimum.ino.cpp.o"
Compiling libraries...
Compiling core...
"/usr/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_pulse.S" -o "/tmp/arduino_build_689430/core/wiring_pulse.S.o"
"/usr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/WInterrupts.c" -o "/tmp/arduino_build_689430/core/WInterrupts.c.o"
"/usr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/hooks.c" -o "/tmp/arduino_build_689430/core/hooks.c.o"
"/usr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring.c" -o "/tmp/arduino_build_689430/core/wiring.c.o"
"/usr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_analog.c" -o "/tmp/arduino_build_689430/core/wiring_analog.c.o"
"/usr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_digital.c" -o "/tmp/arduino_build_689430/core/wiring_digital.c.o"
"/usr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_pulse.c" -o "/tmp/arduino_build_689430/core/wiring_pulse.c.o"
"/usr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_shift.c" -o "/tmp/arduino_build_689430/core/wiring_shift.c.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/CDC.cpp" -o "/tmp/arduino_build_689430/core/CDC.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial.cpp" -o "/tmp/arduino_build_689430/core/HardwareSerial.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial0.cpp" -o "/tmp/arduino_build_689430/core/HardwareSerial0.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial1.cpp" -o "/tmp/arduino_build_689430/core/HardwareSerial1.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial2.cpp" -o "/tmp/arduino_build_689430/core/HardwareSerial2.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial3.cpp" -o "/tmp/arduino_build_689430/core/HardwareSerial3.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/IPAddress.cpp" -o "/tmp/arduino_build_689430/core/IPAddress.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/PluggableUSB.cpp" -o "/tmp/arduino_build_689430/core/PluggableUSB.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/Print.cpp" -o "/tmp/arduino_build_689430/core/Print.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/Stream.cpp" -o "/tmp/arduino_build_689430/core/Stream.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/Tone.cpp" -o "/tmp/arduino_build_689430/core/Tone.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/USBCore.cpp" -o "/tmp/arduino_build_689430/core/USBCore.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/WMath.cpp" -o "/tmp/arduino_build_689430/core/WMath.cpp.o"
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp" -o "/tmp/arduino_build_689430/core/WString.cpp.o"
/usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp:29:47: error: ‘DECIMAL_DIG’ was not declared in this scope
 size_t const String::FLT_MAX_DECIMAL_PLACES = DECIMAL_DIG;
                                               ^
/usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp:30:47: error: ‘DECIMAL_DIG’ was not declared in this scope
 size_t const String::DBL_MAX_DECIMAL_PLACES = DECIMAL_DIG;
                                               ^
/usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp: In constructor ‘String::String(float, unsigned char)’:
/usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp:120:25: error: size of array ‘buf’ is not an integral constant-expression
  char buf[FLOAT_BUF_SIZE];
                         ^
/usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp: In constructor ‘String::String(double, unsigned char)’:
/usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp:129:26: error: size of array ‘buf’ is not an integral constant-expression
  char buf[DOUBLE_BUF_SIZE];
                          ^
exit status 1
Error compiling for board Arduino UNO.

That is bizarre. And this is happening with all sketches? Even the simple Blink example?

This is a complete SWAG, but before going any further, I'd try reinstalling the AVR core, and then trying to compile Blink again.

Ahh. Now that's possibly odd. I would expect the compiler to reside in .../tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin or someplace similar, not /usr/bin.

Since it works on your PC but not the Pi, the problem is with the Pi 5 install. I have not used any of my PIs in a dog's age and have only briefly toyed with the IDE on one, and it did not go well, so I am not going to be of further help. Hopefully one of our Pi helpers will see this..

This is likely because you installed Arduino IDE via apt, which on Raspberry Pi OS ARM64 ships a broken avr-gcc/avr-libc pairing missing DECIMAL_DIG.

Uninstall it

sudo apt remove --purge arduino arduino-mk arduino-core
sudo apt autoremove

Install the right way

cd ~/Downloads
wget https://downloads.arduino.cc/arduino-1.8.19-linuxaarch64.tar.xz
tar -xf arduino-1.8.19-linuxaarch64.tar.xz
cd arduino-1.8.19
sudo ./install.sh

Launch the IDE from the new desktop icon, not the old apt shortcut.

Thought this was the answer, but it at least failed to:
"Adding desktop shortcut, menu item and file associations for Arduino IDE...".
Since I cannot get it to run, not sure what else failed. Will keep trying.

The desktop shortcut, menu item, and file associations are only conveniences. A failure of the install script to create them won't affect Arduino IDE's ability to run.

For now, try this:

  1. If Arduino IDE is already running, select File > Quit from the Arduino IDE menus to close all windows.
  2. Open a shell terminal.
  3. Type the following command in the terminal:
    ~/Downloads/arduino-1.8.19
    
  4. Press the Enter key.
  5. Type the following command in the terminal:
    ./arduino
    
  6. Press the Enter key.

Arduino IDE should now start up. Now try compiling or uploading your sketch again, just as you did before when you encountered the error. Hopefully everything will now work as expected.

Once you have achieved the essential functionality of Arduino IDE, we can then circle back to the subject of the desktop entry, etc. if you like.

I suspect that that is missing a cd.

I get this error:
./arduino: line 35: /home/dik/Downloads/arduino-1.8.19/java/bin/java: cannot execute: required file not found

The file is there as the copied path indicates:
/home/dik/Downloads/arduino-1.8.19/java/bin/java

I guess no body has a solution to this problem!!!

Not sure if I can help

Those are the files on my Linux system in the java/bin directory. Are any of them missing?

333764 drwxr-xr-x 1 wim wim    208 Feb 11  2020 .
333763 drwxr-xr-x 1 wim wim    234 Feb 11  2020 ..
333774 lrwxrwxrwx 1 wim wim      8 Feb 11  2020 ControlPanel -> jcontrol
333773 -rwxr-xr-x 1 wim wim   8464 Feb 11  2020 java
333771 -rwxr-xr-x 1 wim wim 140248 Feb 11  2020 javaws
333769 -rwxr-xr-x 1 wim wim   6264 Feb 11  2020 jcontrol
333767 -rwxr-xr-x 1 wim wim   8584 Feb 11  2020 jjs
333770 -rwxr-xr-x 1 wim wim   8584 Feb 11  2020 keytool
333777 -rwxr-xr-x 1 wim wim   8656 Feb 11  2020 orbd
333776 -rwxr-xr-x 1 wim wim   8584 Feb 11  2020 pack200
333766 -rwxr-xr-x 1 wim wim   8592 Feb 11  2020 policytool
333778 -rwxr-xr-x 1 wim wim   8584 Feb 11  2020 rmid
333772 -rwxr-xr-x 1 wim wim   8592 Feb 11  2020 rmiregistry
333765 -rwxr-xr-x 1 wim wim   8592 Feb 11  2020 servertool
333775 -rwxr-xr-x 1 wim wim   8656 Feb 11  2020 tnameserv
333768 -rwxr-xr-x 1 wim wim 182536 Feb 11  2020 unpack200

Can you confirm you got rid of the apt install and exactly which arduino-1.8.19 archive you downloaded from the Arduino downloads page? (more specifically whether the filename ends in linuxarm.tar.xz or linuxaarch64.tar.xz)?

Can you type in a terminal
cat /etc/os-release
press the Enter key.

and then
~/Downloads/arduino-1.8.19/java/bin/java
press the Enter key.

copy the output and paste it here within code tags, so we can confirm whether the Raspberry Pi 5 is running the 32 bit or 64 bit build of Raspberry Pi OS.

why I'm asking ? ➜ The "cannot execute: required file not found" message from bash could point to an architecture mismatch between the binary and the system, rather than a missing file, since bash already found and attempted to run java before that error appeared. If the OS turns out to be 64 bit but the downloaded tarball was the 32 bit ARM build, or vice versa, that would explain the failure.

A bit of history of this issue. At first I used I used Trixie (64-bit) on a Raspberry Pi 4B, then tried it on a Raspberry Pi 5 and got the same error with both. I then switched to Bookworm, only to get the same issue, which is where I am now.

I down loaded: arduino-1.8.19-linuxaarch64.tar.xz

The results of the suggested process:

dik@TempHumi:~/Downloads/arduino-1.8.19 $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
dik@TempHumi:~/Downloads/arduino-1.8.19 $ ~/Downloads/arduino-1.8.19/java/bin/java
bash: /home/dik/Downloads/arduino-1.8.19/java/bin/java: cannot execute: required file not found

For a normal, unmodified Raspberry Pi OS install straight from Raspberry Pi Imager, ID=raspbian means the 32-bit build and ID=debian means the 64-bit arm64 build

➜ it seems your current install is Raspberry Pi OS 32-bit and you downloaded arduino-1.8.19-linuxaarch64.tar.xz, which bundles a 64-bit ARM java runtime.

Running a 64-bit binary's dynamic linker requirements on a 32-bit only OS produces the "cannot execute: required file not found" error bash gave you I think.

You should download arduino-1.8.19-linuxarm.tar.xz instead, since that matches the running 32-bit Raspbian userspace, or reinstall the Pi with the 64-bit build of Raspberry Pi OS.

I would highly recommend reinstalling the 64 bit build as the 32-bit Raspbian install is only working because it runs a 64-bit kernel underneath with a 32-bit userspace layered on top... No a good situation.

I guess not using:

Has been all the problem. I'll blame my 78 year old brain for that...

Works...

fantastic :)

have fun