Blank project gives errors while uploading Arduino Leonardo on Linux Manjaro
Okay I found a way to do this.
Open Terminal and type:

ls -l /dev/ttyACM*


you will get something like:

crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0

The "0" at the end of ACM might be a different number, or multiple entries might be returned. The data we need is dialout (is the group owner of the file).

Now we just need to add our user to the group:

sudo usermod -a -G dialout &lt;username&gt;


So for me that would be:

sudo usermod -a -G dialout john


BUT it seems to work with dialout on ubuntu/debian based distros. I am on Manjaro and instead of dialout I had to use uucp (and in general on Arch based distros) so:

sudo usermod -a -G uucp john


You will need to log out and log in again for this change to take effect.

This is the procedure to access the serial port from the Arduino Software (IDE) if you get an error

After this procedure, you should be able to proceed normally and upload the sketch to your board or use the Serial Monitor.

Although for me that wasn't over. After doing this the only error I got was Arduino IDe simply saying that it doesn't have permission to write to that port. So I had to start Arduino IDE by:

sudo arduino


in the terminal. After that everything works just fine.

I found help at those links: 


https://www.arduino.cc/en/Guide/Linux#toc6
https://forum.manjaro.org/t/how-to-enable-putty-usb-serial-converter-access-without-sudo/82736