Install fail on Pi

The latest version 1.8.16 installs on Linux on my Thinkpad laptop, but not on my Debian Linux on my Pi. This is the terminal text when running install.sh:

pi@raspberrypi:~/arduino/arduino-1.8.16 $ sudo ./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:~/arduino/arduino-1.8.16 $ 

I see a new icon on the desktop and in the "programming" list, but when clicked they only show an hourglass for maybe 40 seconds then nothing, no errors, etc.

There is a bug report about it here:

My advice is to just forget about the installation script. It is not required in any way. Just run the arduino script you find in ~/arduino/arduino-1.8.16/ and the Arduino IDE will start up and work perfectly well.

thanks, but as a complete Linux noob, I've tried to run everything in the root. Here are the files:
arduino (no extension)
arduino-builder (no extension)
arduino-linux-setup.sh
and a handful of sub-directories (and the install and uninstall scripts)

The one script arduino-linux-setup.sh won't run (some error with ... $USER at the end). The other two files basically come back and say can't execute the binary.

That is the one.

Please provide the full and exact output from trying to run that one.

I was sneaker netting the terminal text between computers, so I knew I was guilty (as charged) not putting up the whole shebang. Here it is:

pi@raspberrypi:~ $ cd arduino
pi@raspberrypi:~/arduino $ cd arduino-1.8.16
pi@raspberrypi:~/arduino/arduino-1.8.16 $ dir
arduino			examples    java       revisions.txt  uninstall.sh
arduino-builder		hardware    lib        tools
arduino-linux-setup.sh	install.sh  libraries  tools-builder
pi@raspberrypi:~/arduino/arduino-1.8.16 $ ./arduino
./arduino: line 35: /home/pi/arduino/arduino-1.8.16/java/bin/java: cannot execute binary file: Exec format error
pi@raspberrypi:~/arduino/arduino-1.8.16 $ ./arduino-linux-setup.sh

Run the script with command ./arduino-linux-setup.sh $USER

pi@raspberrypi:~/arduino/arduino-1.8.16 $ 

Try ./arduino-linux-setup.sh pi
The phrase $USER refers to your username.

EDIT - ...which on the Pi is "pi" by default.

thanks, I was just randomly trying noob stuff. The problem is with the ./arduino command immediately above. But I'll follow your recommendation and see how much havoc I can create.

That command may not work until the setup is completed.

the setup completed successfully, but ./arduino continues to have the same Exec format error.

I cannot help you any further.

See message #5 which explains the exec errors caused by using 64-bit version on 32-bit OS.
Or using x86(Intel/AMD) exec on ARM CPU or vice versa.

I suspect you have identified the problem! I'm off to get the correct package!

OK, got the 64bit ARM processor version. Same error: Line 35 "Exec format error"

Code is NOT running on a Pi 3B+ Debian.

This is my working configuration on a Pi400 running Raspberry Pi OS (Linux 32 bit OS) and Arduino IDE Linux ARM 32 bits". If you are new to Raspberry Pi, I recommend using the Raspberry Pi OS. Lots of stuff just works that may or may not work on other Linux distros.

pi@pi400:~/arduino-1.8.16 $ uname -a
Linux pi400 5.10.63-v7l+ #1488 SMP Thu Nov 18 16:15:28 GMT 2021 armv7l GNU/Linux

pi@pi400:~/arduino-1.8.16 $ file java/bin/java
/home/pi/arduino-1.8.16/java/bin/java: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=120db07177774249eac5925cd51bc42cf3033ccd, not stripped

Try the "Linux ARM 32 bits" offering from the Software page.

the ARM 32 bit version did the trick. At least the Arduino IDE opened. Thanks.

You're welcome. I'm glad to hear it is working now.

This 64 vs. 32 bit thing is a common source of confusion for those attempting to use the IDE on Raspberry Pi computers. Even though the CPU is 64 bits, the Raspian OS is 32 bits. In that case, it is necessary to use the 32 bit ARM Linux version of the IDE.

OK, I have to award a dope slap to the community. Being a noob, I dutifully read lots of reviews, etc., about the available OS's for Pi and found this line "...Raspberry Pi OS split into two flavors: a 32-bit OS that still uses Raspbian source code, and a Debian ARM64-based 64-bit version." Having a Pi 3B+, it seemed logical that I'd have a 64-bit OS. Following your post, I went back to read the Pi OS page; it's silent on 32/64 bits.

So I go into the "help" menu on both of my Pi's and one of the selections is "Debian Reference", but if I click on the Raspberry icon "Getting Started" it opens a Raspbian page.

Now for the obvious noob question, is there an "about" button that lists specs like processor, speed, memory, operating system, etc.? Gee, I wonder if any other operating system has something like this? :grin:

If the output of "uname -m" does not include "64", the OS is almost certainly 32 bits.

From Raspberry Pi OS (previously known as Raspbian) 32 bit OS.

$ uname -m
armv7l

I am not currently running 64 bit ARM Linux but I recall it would say something like "aarch64" for ARM architecture 64 bits.

The same command on an AMD desktop running 64 bit Ubuntu Linux returns "x86_64".

Linux Mint.

thanks for the command. I get "armv7l" as a response.

Everybody has been very helpful. Over and out.