1

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.

Artur Meinild
  • 26,018

1 Answers1

2

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 
Artur Meinild
  • 26,018
  • 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. – Nikos Vallas Sep 20 '21 at 12:36
  • 1
    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 – Christian Ehrhardt Sep 20 '21 at 13:02
  • @ChristianEhrhardt I very much agree, so nice detail to point out! – Artur Meinild Sep 20 '21 at 13:44
  • 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. – Nikos Vallas Sep 21 '21 at 10:18