package update in ubuntu on vitual box

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
userMe@userMe-ubuntu:~$ 

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.

3

3 Answers

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.

2

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

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like