This error is showing up when using sudo apt get update:
E: Syntax error /etc/apt/apt.conf:2: Extra junk at end of file
This error is showing up when using sudo apt get update:
E: Syntax error /etc/apt/apt.conf:2: Extra junk at end of file
In a comment, you wrote that the content of the file is:
Acquire::http::proxy “http://<proxy_server>:<port>/”;
In this case, the content of your apt.conf is not well-formed.
If you need it to use apt behind a proxy, <proxy_server> and <port> should be replaced by the real values of proxy server and port.
Just as an example, you can check the question here to see how a proper apt.conf file is written.
Therefore, you have two possible solutions:
sudo mv /etc/apt/apt.conf /etc/apt/apt.conf.bak, then check if sudo apt-get update works (this may work only if you don't really need to be behind a proxy).sudo -H gedit /etc/apt/apt.conf and edit the file replacing the two placeholders with correct proxy server and port.