NEW USER - Arduino 1.8.12 install on latest Raspbian - not working

Apologies. I am a VERY new Raspbian on PI4 and Arduino user (2 days). The Raspbian is completely current. I downloaded the IDE and installed with SUDO from root. The IDE will not start at all. The installation error messages I received are pasted in from the console below.

pi@raspberrypi:~ $ sudo /home/pi/Applications/arduino-1.8.12/./install.sh
Adding desktop shortcut, menu item and file associations for Arduino IDE...

touch: cannot touch '/root/.config/mimeapps.list': No such file or directory
/usr/bin/xdg-mime: 848: /usr/bin/xdg-mime: cannot create /root/.config/mimeapps.list.new: Directory nonexistent

done!
pi@raspberrypi:~ $

What guidance would this forum have for me?

Do older versions of the IDE work? This will help us to know if there was a recent change to Arduino that caused this...

Thank you for the idea.

I uninstalled Arduino 1.8.12 and then downloaded and installed Arduino 1.8.10 and received the following (same) error in Console.

pi@raspberrypi:/ $ sudo /home/pi/Applications/arduino-1.8.10/install.sh
Adding desktop shortcut, menu item and file associations for Arduino IDE...

touch: cannot touch '/root/.config/mimeapps.list': No such file or directory
/usr/bin/xdg-mime: 848: /usr/bin/xdg-mime: cannot create /root/.config/mimeapps.list.new: Directory nonexistent

done!
pi@raspberrypi:/ $

Is it possible i need to completely re-install Raspbian?

after the above post I re-flashed Raspbian Full using my Mac. Then I tried to install 1.8.1, 18.7 and 1.8.12 with the same error messages. I have no idea what to do next!

Are there parameters on the 'install' script that i need to specify? Otherwise I have no idea what to do next.

I don't think this output from the install script indicates a problem. Let's forget about that for now and focus on the other thing you said:

jbor:
The IDE will not start at all.

Are you saying the Arduino IDE doesn't start if you run ./arduino?

Thanks for trying to help. I ran the Arduino install and then executed the following as you requested. Please note the results.

$ cd /home/pi/Applications/arduino-1.8.12
pi@raspberrypi:~/Applications/arduino-1.8.12 $ ./arduino
./arduino: line 35: /home/pi/Applications/arduino-1.8.12/java/bin/java: cannot execute binary file: Exec format error
pi@raspberrypi:~/Applications/arduino-1.8.12 $

I think the cause of this error is using the wrong version of the Arduino IDE. For Raspberry Pi, you need to use the version you get from the "Linux ARM 32 bits" link from the downloads page.