unable to locate package ntp

Asked by Amin tavakoli

I have installed ubuntu server 12.04.1. Now I want to install ntp server. When I do that with

apt-get install ntp

I get an error message saying:

E: unable to locate package ntp

What can be wrong?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ntp Edit question
Assignee:
No assignee Edit question
Solved by:
N1ck 7h0m4d4k15
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

(08:50:45) actionParsnip: !info ntp
(08:50:47) ubottu: ntp (source: ntp): Network Time Protocol daemon and utility programs. In component main, is optional. Version 1:4.2.6.p3+dfsg-1ubuntu3.1 (precise), package size 581 kB, installed size 1396 kB

Did you run:

sudo apt-get update
sudo apt-get install ntp

Isn't ntp part of a default install?

Revision history for this message
Best N1ck 7h0m4d4k15 (nicktux) said :
#2

Its

sudo apt-get install ntp

Do you have internet connection ?

If not then you can go here: http://packages.ubuntu.com/precise/ntp

Download the package from a PC with Internet connection , and the install it to yours.

Package ntp is available under the Precise/main repository.

If you have Internet connection then check your sources.list

cat /etc/apt/sources.list

and see if main repository is enabled.

You can check it with a GUI way if you want

gksudo software-properties-gtk

and at the opened window , see if the first option

Canonical supported and open-source software (main)

is marked (ticked).

Thanks

Revision history for this message
Warren Hill (warren-hill) said :
#3

It should be there: I can see it.

Open a terminal (CTRL+ALT+T) and enter the following commands

uname -a; sudo apt-get update && sudo apt-get install ntp

If this works mark the question solved if not post the full output back here and we will advise further

Revision history for this message
Amin tavakoli (amin-tavakoli) said :
#4

Thanks NikTh, that solved my question.