Rcayot
Posts: 24
Joined: Sun Jan 26, 2020 8:24 pm

trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 2:12 pm

if anyone can help, it would b e appreciated.

After using Arduino for several months, I decided I wanted to update my IDE software version. I downloaded the Linux 32 bit cersion of arduino-1.8.13, and ran the install, here is what I get:

pi@raspberrypi:~/Arduino/arduino-1.8.13 $ 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!


Well, needless to say the install was not successful. Anyone know what I can do to fix? I have uninstalled previous version, uninstalled and reinstalled both older version and new version, and rebooted several times.

Please help if you can.

Roger Ayotte

User avatar
Botspot
Posts: 1676
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas! :)
Contact: Website

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 3:20 pm

Rcayot wrote:
Wed Sep 16, 2020 2:12 pm
I downloaded the Linux 32 bit cersion of arduino-1.8.13, and ran the install, here is what I get:

Code: Select all

pi@raspberrypi:~/Arduino/arduino-1.8.13 $ sudo ./install.sh
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
I remember having the same issue. IIRC, it installed successfully when I ran install.sh as pi user. (so drop the sudo)

BTW: you mentioned 'Linux 32 bit' version. Many users would assume you downloaded x86 32-bit. (which is not what you want, as the Pi is ARM 32-bit/armhf)
Want to run Minecraft Java on your RPi? Easiest way is with Pi-Apps - just click Install.
https://github.com/Botspot/pi-apps
Pi-Apps also includes Zoom, Visual Studio, Tor browser, Windows 10 theme, and 33 more.
Over 50,000 users!

dbrion06
Posts: 250
Joined: Tue May 28, 2019 11:57 am

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 3:42 pm

Well, from what-s-he tells, -s-he already installed Arduino (and the download link is unambiguous).

I had no issue with upgrading from Arduino-xx-12 to xx-13 on a pi4, with RPIOS32

ChaskiWanka
Posts: 9
Joined: Thu Mar 15, 2018 3:47 am

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 4:58 pm

Webp.net-resizeimage.jpg
Webp.net-resizeimage.jpg (40.65 KiB) Viewed 640 times
lshw_command_shows32bit_4GB_RAM.jpg
lshw_command_shows32bit_4GB_RAM.jpg (159.98 KiB) Viewed 640 times
Greetings;
On the Raspberry Pi 4 - 4 GB, I installed the ARM Arduino 32bit file. It extracted and installed. But when I click on the Arduino Icon in the GUI, the Arduino compiler does not open. Do I reinstall ARM Arduino 32 bit ....or uninstall ARM Arduino 32 bit and install ARM Arduino 64 bit?

I
Last edited by ChaskiWanka on Wed Sep 16, 2020 5:08 pm, edited 1 time in total.

hippy
Posts: 9226
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 5:06 pm

The "touch" / "mimeapps" issue has occurred with every IDE Arduino install I have ever attempted on a Pi. It has not however interfered with operation and can IMO be considered a warning rather than an error or installation failure.

The developer of the install script obviously expects '/root' to have some particular layout even when it doesn't on some distros and the script doesn't handle that very elegantly.

Rcayot
Posts: 24
Joined: Sun Jan 26, 2020 8:24 pm

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 5:17 pm

When I run the install as Pi user, the error I get tells me to run with sudo

"pi@raspberrypi:~/Arduino/arduino-1.8.13 $ ./install.sh
Adding desktop shortcut, menu item and file associations for Arduino IDE...
rm: cannot remove '/usr/local/bin/arduino': Permission denied
Removing symlink failed. Hope that's OK. If not then rerun as root with sudo.

rm: cannot remove '/usr/local/bin/arduino': Permission denied
Removing symlink failed. Hope that's OK. If not then rerun as root with sudo.

ln: failed to create symbolic link '/usr/local/bin/arduino': File exists
Adding symlink failed. Hope that's OK. If not then rerun as root with sudo.
done!"

Still, when rerun with sudo, the same error as previously posted comes up and does not run when teh desktop icon is run. Neither does it runh when 'right clicked' and 'open' from file manager.

Again, any help would be appreciated. The normally helpful Arduino forums do not appear to want to deal with a Pi problem.

Roger

hippy
Posts: 9226
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 5:29 pm

Running with 'sudo' generates some messages about what it couldn't do. Running without 'sudo' generates even more messages about what it couldn't do. All these are IMO non-important and don't affect the actual installation, though running without 'sudo' may not allow use of the 'arduino' command at the command line.

So ... run with 'sudo', ignore the messages of what it couldn't do.

Now ... making it work from the desktop. That can be a bit tricky because it's not clear what mess has been created.

First thing is to run 'arduino --version' from the command line to find what version is installed. You should see something like ...

Code: Select all

pi@Pi3B:~ $ arduino --version
Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Initialising packages...
Preparing boards...
Arduino: 1.8.13
Next, run an 'arduino' command from a Terminal opened from your desktop. Does that launch the Arduino 1.8.13 IDE ?

Code: Select all

pi@Pi3B:~ $ arduino
Picked up JAVA_TOOL_OPTIONS: 
Set log4j store directory /home/pi/.arduino15
... Arduino IDE should pop-up over desktop
If all that works then the issue is with the Start Menu shortcut. And I'll have to get back to you on how to fix that.
Last edited by hippy on Wed Sep 16, 2020 5:31 pm, edited 1 time in total.

User avatar
Botspot
Posts: 1676
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas! :)
Contact: Website

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 5:29 pm

Rcayot wrote:
Wed Sep 16, 2020 5:17 pm

Code: Select all

"pi@raspberrypi:~/Arduino/arduino-1.8.13 $ ./install.sh
ln: failed to create symbolic link '/usr/local/bin/arduino': File exists
Adding symlink failed. Hope that's OK. If not then rerun as root with sudo.
 done!"
Still, when rerun with sudo, the same error as previously posted comes up and does not run when teh desktop icon is run.
It's been a while. Though I do recall running install.sh first as Pi user, then again as root user. After doing those two passes it worked for me.
Want to run Minecraft Java on your RPi? Easiest way is with Pi-Apps - just click Install.
https://github.com/Botspot/pi-apps
Pi-Apps also includes Zoom, Visual Studio, Tor browser, Windows 10 theme, and 33 more.
Over 50,000 users!

Rcayot
Posts: 24
Joined: Sun Jan 26, 2020 8:24 pm

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 5:38 pm

some additional information:

This appears to be part of the problem:

"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"

Well, there is no "/root/.config/mimeapps.list"

But there IS:

/home/pi/.config/mimeapps.list

How do I get this corrected? I do not think I can just move the file.

Roger

Rcayot
Posts: 24
Joined: Sun Jan 26, 2020 8:24 pm

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 5:50 pm

I think that the 'arduino' script does not work. The desktop icon 'properties' 'desktop entry' indicates the file to run is "/home/pi/Arduino/arduino-1.8.13/arduino"

and when I run 'arduino' from that directory, the app does not start.

and here is what happens if I run from teh command line:

"pi@raspberrypi:~/Arduino/arduino-1.8.13 $ arduino --version
/usr/local/bin/arduino: line 35: /home/pi/Arduino/arduino-1.8.13/java/bin/java: cannot execute binary file: Exec format error"

are we making progress?

Roger

User avatar
neilgl
Posts: 2669
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 6:33 pm

Did you download the correct version from the Arduino website, i.e. “Linux ARM 32 bits", not “Linux 32 bits”?

User avatar
Botspot
Posts: 1676
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas! :)
Contact: Website

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 6:36 pm

OK I went ahead and booted a fresh RaspiOS image using my Vdesktop VM software.
This sequence of commands installs Arduino on the VM successfully:

Code: Select all

wget https://downloads.arduino.cc/arduino-1.8.13-linuxarm.tar.xz
xz -d /home/pi/arduino-1.8.13-linuxarm.tar.xz
tar -xf /home/pi/arduino-1.8.13-linuxarm.tar
/home/pi/arduino-1.8.13/install.sh
sudo /home/pi/arduino-1.8.13/install.sh
Want to run Minecraft Java on your RPi? Easiest way is with Pi-Apps - just click Install.
https://github.com/Botspot/pi-apps
Pi-Apps also includes Zoom, Visual Studio, Tor browser, Windows 10 theme, and 33 more.
Over 50,000 users!

Rcayot
Posts: 24
Joined: Sun Jan 26, 2020 8:24 pm

Re: trouble with Arduino IDE install on Pi-4

Wed Sep 16, 2020 7:05 pm

I downbloaded linus32.tar not linuxarm.tar.

Going to uninstall, then install 1.8.12

Roger

hippy
Posts: 9226
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: trouble with Arduino IDE install on Pi-4

Thu Sep 17, 2020 12:56 pm

Rcayot wrote:
Wed Sep 16, 2020 5:38 pm
This appears to be part of the problem:

"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"

Well, there is no "/root/.config/mimeapps.list"

But there IS:

/home/pi/.config/mimeapps.list

How do I get this corrected? I do not think I can just move the file.
Just ignore it.

You will very likely get the same message when you install the correct package but AIUI it isn't actually problematic, won't prevent installation, won't prevent the Arduino IDE running, has no discernible consequences I have seen.

Suggestions to improve the installation scripts should be directed at the Arduino IDE developers.

User avatar
neilgl
Posts: 2669
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: trouble with Arduino IDE install on Pi-4

Thu Sep 17, 2020 1:54 pm

I downbloaded linus32.tar not linuxarm.tar.

OK that is a common mistake.
Let us know if it is working now...

ChaskiWanka
Posts: 9
Joined: Thu Mar 15, 2018 3:47 am

Re: trouble with Arduino IDE install on Pi-4

Fri Sep 18, 2020 11:05 am

Greetings, on my RPi 4 ,I uninstalled Arduino 1.8.13 using rm -RF arduino-1.8.13-linuxaarch64.tar.xz . From arduino.cc I downloaded Linux ARM 32 bit.
2) I right clicked on the zipped icon and selected "Extract Here"
3) waited several minutes ...there was no prompts on the screen... then another extracted was displayed Downloads directory.

4) went to terminal
cd Downloads
ls -all
pi@raspberry:~/Downloads$ cd arduino-1-8.13

pi@raspberry:~/Downloads/ arduino-1-8.13 $ ls -all

pi@raspberry:~/Downloads/ arduino-1-8.13 $ sudo ./install.sh

couple of minutes later it says done.
The icon appears under Programming and runs the Arduino UNO using dev USB...... not dev TTY .

These instructions worked on both the 3B+ and RPi 4 using the Linux ARM 32 bit download. It did NOT work with the Linux ARM 64 bit download.

Blessings..

Rcayot
Posts: 24
Joined: Sun Jan 26, 2020 8:24 pm

Re: trouble with Arduino IDE install on Pi-4

Fri Sep 18, 2020 12:53 pm

downloading the correct version worked perfectly.

I did not heed early suggestions to check if it was the correct version. Learned valuable lesson!

Thanks to all!

Roger

User avatar
neilgl
Posts: 2669
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: trouble with Arduino IDE install on Pi-4

Fri Sep 18, 2020 8:35 pm

I am glad it is now working for you.

Return to “Troubleshooting”