Ubuntu arduino error usb

Hello.
I have downloaded and installed arduino 1.8.12 in ubuntu
When I run a code and put the usb in my laptop I get this error sometimes for no reason:

avrdude: ser_open(): can't open device "/dev/ttyACM0": No such file or directory
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

The port is checked
The port is dev/ttyACM0.

Why is this happening ?

arduinick:
When I run a code and put the usb in my laptop I get this error sometimes for no reason:

I presume that means that it works properly at other times.

That happens to me also. I think it is because the operating system has not properly detected the Arduino when the USB plug was inserted. I just remove and reinsert the plug. I suspect that one of my USB ports may not always connect reliably, or maybe the fault is with my USB cable. The problem has not been bad enough to make me take the trouble to investigate.

...R

I disconnect and connect again the usb more than 10 times and I get the same error. >:( >:(

Has it ever worked properly?

What Arduino are you using?

Have you anything connected to the Arduino other than the USB cable?

...R