To fix this issue, open the apt.conf configuration file:

vi /etc/apt/apt.conf

Add this row or check it if already exists:

Acquire::http::proxy “http://proxy.localdomain:8080/”;