Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I got the following error after configuring proxy in /etc/apt/apt.conf as Acquire::http::proxy http://192.168.96.0:8080:

e: syntax error /etc/apt/apt.conf:2: extra junk at end of file.

and I don't have the proxy authentication. How do I fix this?

share|improve this question
1  
Please post the contents of /etc/apt/apt.conf –  Jorge Castro Feb 20 '12 at 23:21
add comment

marked as duplicate by Braiam, minerz029, karel, falconer, BuZZ-dEE Jan 6 at 12:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers

It looks like you forget ";" at the end of line.

Try this:

Acquire::http::proxy http://192.168.96.0:808;

share|improve this answer
add comment

I have experienced that after removing the "http://" after the proxy in the above string has helped.

So the revised line would be:
Acquire::http::proxy 192.168.96.0:80;

share|improve this answer
add comment

you much change to Acquire::http::proxy "192.168.96.0:80"; The ";" must place end of the line

share|improve this answer
add comment

I had the same error and had to put the address and port part in quotation marks. Likes so:

Acquire::http::proxy "192.168.96.0:80;"
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.