unable to locate package ntp

Asked by Amin tavakoli on 2012-10-18

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:
2012-10-18
Last query:
2012-10-18
Last reply:
2012-10-18

(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?

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

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

Amin tavakoli (amin-tavakoli) said : #4

Thanks NikTh, that solved my question.