I've just installed the latest Arduino IDE 1.8.9 on Ubuntu 18.04 and found that the installation isn't quite as smooth as one would want it.
The install script install.sh had some glitches in it and needed some manual fixes. Refer #8779. So, the error messages ...
Adding desktop shortcut and menu item for Arduino IDE...
rm: cannot remove '/usr/local/bin/arduino': No such file or directory
Removing symlink failed. Hope that's OK. If not then rerun as root with sudo.
rm: cannot remove '/usr/local/bin/arduino': No such file or directory
Removing symlink failed. Hope that's OK. If not then rerun as root with sudo.
Done!
... for that you can't do much about it, unless you apply the fix c3675a8 to the install script. That's caused by the install script attempting to remove the symlinks of the previous install, which does not exist. This can be ignored.
Next up, we have the install script creating an icon on the Desktop that doesn't quite work : https://imgur.com/8BdHBbP. To fix this you have to issue the following command ...
sudo chown YourUserName /path/to/icon/arduino-arduinoide.desktop
Open a Terminal (Ctrl+Alt+T) and run the command. YourUserName is shown in the prompt. When your Terminal starts into your Home directory, /path/to/icon should just be "Desktop". My command will look like this ...
sudo chown kenneth Desktop/arduino-arduinoide.desktop
Run Arduino once from the desktop symlink and the Arduino icon "Arduino IDE" will appear nicely over the raw filename.
Starting off with the IDE, I was in for some further surprises. If you select a board other that the Genuino / Uno (Tools > Board), for example ...
Adafruit Feather HUZZAH ESP8266
... and you proceed with a test compile, you will get the followin error message ...
fork/exec /home/<user>/.arduino15/packages/esp8266/tools/python/3.7.2-post1/python: no such file or directory
Error compiling for board <board>.
After a little digging, I found that the symlink python inside
.arduino15/packages/esp8266/tools/python/3.7.2-post1 was an orphaned link pointing to the old Python2+ location /usr/bin/python. Since Ubuntu 18.04.2 LTS came default with Python 3.6.8, I had to redo the symlink (soft) to /usr/bin/python3 or you can straight point it to python3.6.
To do that, open a Terminal, move to your Home directory (to move to your Home directory you can do cd ~ or cd $HOME), then cd to .arduino15/packages/esp8266/tools/python/3.7.2-post1. Rename the file python to python_OLD (just in case you might want it back). To rename, use the command mv python python_OLD. Then create a new soft symlink pointing to python3.6 : ln -s /usr/bin/python3 python (you need to keep the filename python because the compiler uses that name to invoke python).
cd ~
cd .arduino15/packages/esp8266/tools/python/3.7.2-post1
mv python python_OLD
ln -s /usr/bin/python3 python
Note: If you have Python 3.7.x (latest as of 2019.07.27 is 3.7.4), you'll need to point the symlink to that version.
This resolves the 2 issues I've found so far with the new Arduino IDE 1.8.9. I'll post as further problems are encountered along the way.
Other references ...
ESPOTA.py Passes Wrong .BIN File