[SOLVED] Can't upload arduino sketch

SOLVED: My bad, I managed to find another board and that one works, so I think I need to install a new bootloader in the one that does not work

Hello

I am trying to develop my arduino mega but the IDE fails when I try to upload the sketch to this arduino mega:

/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cwiring -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/arduino_build_803170/blink.ino.hex:i

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

Even with the upload debug checked I don’t see much more than what I pasted here so I am not sure what is going on.

I am not an expert but the board looks like working correctly because I see the “L” led blinking and the power led is green.

(Side note I would like to use the IDE without have to run it as sudo, now I can’t because otherwise the upload fails saying that I don’t have permission to write to /dev/ttyACM0)

Thanks