Thursday, November 22, 2012

Package 'make' has no installation candidate

If you encounter the message stated on the title post when you try to install make on your Ubuntu server as shown below:

abc@abc:/etc/apt$ sudo apt-get install make
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package make 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 'make' has no installation candidate

There is a possibility that your source is down and this is what happen to me when i do sudo apt-get update
As you can see there are a lot of "Gateway Timeout" message. So to solve this, i have to manually change the source from sg.archive.ubuntu.com to source like us.archive.ubuntu.com.

Open this file, /etc/apt/sources.list and replace all the sg.archive.ubuntu.com to us.archive.ubuntu.com. After that, do the sudo apt-get update and if the source is workable, you should not see any error messages as shown below:
And now i can install make without problem
abc@abc:/etc/apt$ sudo apt-get install make
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  make-doc
The following NEW packages will be installed:
  make
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 kB of archives.
After this operation, 324 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main make amd64 3.81-8.1ubuntu1.1 [119 kB]
Fetched 119 kB in 3s (36.6 kB/s)
Selecting previously unselected package make.
(Reading database ... 84546 files and directories currently installed.)
Unpacking make (from .../make_3.81-8.1ubuntu1.1_amd64.deb) ...
Processing triggers for man-db ...
Setting up make (3.81-8.1ubuntu1.1) ...

No comments: