Score:1

NTP server install fails on Ubuntu 20.04.3 LTS

pl flag

It's been my first time posting a question. I have install Ubuntu 20.04.3 LTS on a server in order to be my NTP server for my network. I try to install the NTP server but I get the error:

$ sudo apt-get install ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 ntp : Depends: libopts25 (>= 1:5.18.16) but it is not installable
       Recommends: sntp but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried also to install sntp, just in case, but same problem:

$ sudo apt-get install sntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 sntp : Depends: libopts25 (>= 1:5.18.16) but it is not installable
E: Unable to correct problems, you have held broken packages.

I also tried the command below to install the libopts25 with NTP but same problem once again.

$ sudo apt-get install ntp libopts25
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libopts25 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 'libopts25' has no installation candidate

It seems that the libopts25 package is missing or obsolete (?). If this package is dependancy for NTP, is there another procedure to install NTP on Ubuntu server?

The server has full access to the internet. Any recommendations will be helpful.

Knud Larsen avatar
by flag
`sudo apt install ntp` : Probably do `sudo apt update && sudo apt install ntp` → → No issues here, `ntp, libopts25, sntp` are installed.
N0rbert avatar
zw flag
Does this answer your question? [How do I enable the "Universe" repository?](https://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository)
karel avatar
sa flag
Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages)
Score:2
vn flag

You need to have the universe repository enabled to install ntp and libopts25. Make sure this line is in your /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu focal universe

Then you should be able to install with:

$ sudo apt update && sudo apt install ntp 
Nikos Vallas avatar
pl flag
Hi. Thank you very much for the reply. The file sources.list is ok. I run an apt update and upgrade. After that I was able to install ntp.
Christian Ehrhardt avatar
sl flag
While the answer of artur-meinild is correct and gets my upvote in answering why you could not install the dependency of libopts25 I wanted to make sure @nikos-vallas is aware that since 18.04 the recommended NTP server is chrony, see https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes#Chrony
Artur Meinild avatar
vn flag
@ChristianEhrhardt I very much agree, so nice detail to point out!
Nikos Vallas avatar
pl flag
Hi @Christian. Thanks for the info. I have other NTP servers running on CentOS and this one was my first approach to Ubuntu and NTP and I managed to have it working ok now. I also have a look at the link you provide regarding Chrony.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.