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

while following one of the tutorials I needed to install a curl package. Here are my system configuration:

Virtualbox 4.1 on Windows 7 64 bit. I have installed ubuntu 12.04 on the virtual box.

When I try the following:

sudo apt-get install curl

I see the following errors:

[sudo] password for userMe: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'curl' has no installation candidate

When I try the same on a direct installation of ubuntu on a laptop (not a virtual machine) there is no problem.

I am assuming this may be because of network settings. Please note that my work PC is in a corporate network and uses auto proxy settings (using a .pac file) for internet access etc.

Any help will be appreciated.

share|improve this question
Is main repository activated? Did you sudo apt-get update your package list? – Takkat May 31 '12 at 17:52
Can the VM connect to the Internet? Open a web browser in the VM and connect to Google or Yahoo. – Tom May 31 '12 at 18:06
Yes. I set up the proxy in the ubuntu firefox exactly like my windows 7 IE settings and internet access from firefox runs just fine. I was wondering if ubuntu knows to use these proxyies as needed. not sure. – Ayusman May 31 '12 at 18:39

Try doing sudo apt-get update first, and then try to install. If this is a new installation into VBox, then this sometimes is necessary.

Second, if the issue does not get resolved, make sure you have the "main" repository active. You can check this from within Synaptic, which is a package manager, or by going and checking /etc/apt/sources.list for a line that has the ubuntu archive mirror and 'main' on the same line.

If none of these options help, and 'main' is active, then you may just not be able to given your IT policies and firewall settings on your corporate network.

share|improve this answer
Yes I tried the sudo apt-get update and this is what I see userMe@userMe-ubuntu:~$ sudo apt-get update [sudo] password for ayusman: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ userMe@userMe-ubuntu:~$ Any ideas on this? – Ayusman May 31 '12 at 20:36
Are you running anything else? Synaptic or the Ubuntu Software Center at the same time? Because both of those lock out the others from using apt-related stuff – Thomas Ward Jun 1 '12 at 11:41

Try installing php5-curl Install php5-curl, either by clicking that link, or running these commands in the Terminal (Ctrl+Alt+T):

sudo apt-get update
sudo apt-get install php5-curl
share|improve this answer

After some hit and trial. This solution worked for me:

It seems like the network related issues may be there, especially working from behind a firewall or corporate reverse proxy. May differ for others.

Hope this helps somebody.

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.