Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to install some programs on a computer which uses a proxy to access to the Internet. I tried to configure the proxy access but for reason that I do not understand this does not work. I can surf the web but not use apt-get. I get some errors containing 401 unauthorised which I do not understand bu make me think that the proxy is meant to prevent the type of connection that apt-get uses.

I mainly want to install emacs. how can this be done simply using a web browser?

share|improve this question
apt uses HTTP, so it's strange that you had trouble. You might want to try again, by either running export http_proxy=local.proxy.domain:800 - obviously using the correct server and port - or by adding Acquire::http::proxy "http://local.proxy.domain:800/"; to /etc/apt/apt.conf – jackweirdy Oct 24 '12 at 14:32
I am not sure about the port. That might be the problem. – Alfred M. Oct 24 '12 at 14:56
up vote 5 down vote accepted

You can always download the .deb packages and install them manually using

dpkg -i package_name.deb

To download the package, go to this web page and select your Ubuntu version.

You will find a web site giving you alternate package versions (emacs23-lucid and emacs23-nox, the latter only to use with a terminal); also, you will find a number of dependencies -- packages that you must install before installing emacs, for example common emacs binaries. dpkg will complain about unsatisfied dependencies.

That said, I would rather search for a solution with your proxy setup, because you will have a recurring problem with updates (including security updates) and installing new software. Ask a new question with details on the error messages and your proxy configuration.

share|improve this answer
nice answer :) You're right to say that about fixing the proxy though; often installing a .deb which isn't from the ubuntu repos will prevent that package from getting updates or will cause it to do strange things to dependencies... – jackweirdy Oct 24 '12 at 14:34

This might seem not proper way but it works take a terminal and run sudo apt-get install emacs

Since proxy is not working you will get error messages , see at the end of error messages you can see like this

Failed to fetch Could not resolve '' Failed to fetch Could not resolve '' ......

This are the files that are need too install emacs, if you are patient enough copy paste each link and download the files into a folder.

then copy the entire files to /var/cache/apt/archives then again run

sudo apt-get install emacs, it should work.

And please note this might not work if you havnt never run a successful sudo apt-get update

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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