Can't download: https://downloads.arduino.cc/libraries/library_index.json

Errors:

If I want to verify my code I see sometimes these errors:

Can't download: https://downloads.arduino.cc/libraries/library_index.json https://downloads.arduino.cc/packages/package_index.json

I can easily open these links in a web browser and I see bodies of JSON files.

Arduino Yun Rev 2

Can you please post an example of code that produces this error, the version number of the IDE and details of your operating system ?

Now, in this case, I have connected Arduino over USB to R Pi. I do this "ls /dev/tty*" in Raspberry Pi terminal, the result doesn't content "/dev/ttyACM0" I see only "/dev/ttyAMA0". Is it okay?

I have created a new sketch:

void setup() {
    Serial.begin(9600);
}
void loop() {
Serial.println("Hello");
delay(400);
}

IDE: 1.8.11 Hourly Build 2019/10/29 11:20 OS: Raspberry Pi 4b

I can see no reason why that sketch should produce the errors that you see

As to the Serial port, if you can see /dev/ttyAMA0 in Tools/Port in the IDE then it must exist

As to the version of the IDE, why do people feel compelled to use hourly builds unless there is a compelling reason to do so. Does the problem occur with say 1,8,10 ?

I use Arduino Yun Rev 2.
I have changed my code and I see /dev/ttyAMA0 in Tools/Port in the IDE.
I run Serial Monitor from IDE and I see You are connected to the Console! but nothing more. It should be printed Hello from a loop(). The serial monitor doesn’t print. Do you know why? I have added a Bridge library and Console.

#include<Console.h>
#include<Bridge.h>

void setup() {
  delay(50);
Bridge.begin();
Console.begin();
while(!Console){
}
Console.println("You are connected to the Console!");

Serial.begin(9600);
}

void loop() {
 
Serial.println("Hello");
delay(1);
}