Can't download xlock into Ubuntu 18.04

I have been trying to install xlock using the command

sudo apt-get install xlock

It outputs this instead of installing xlock:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package xlock 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 'xlock' has no installation candidate

I have already done the two following commands before trying to install xlock respectively:

sudo apt-get update
sudo apt-get upgrade

In case the reader simply doesn't think xlock doesn't exist, here is the url for its man page: here

I am new to Linux (six month year old user) so I am far from knowledgeable. Please help.

2

2 Answers

You chose wrong package: xclock is available in x11-apps package.
Check on the .

So the correct command is:

sudo apt-get install x11-apps

Also if you do not know/remember package name you can write its executable name in terminal to get the suggestion from command-not-found tool:

$ xlock
Command 'xlock' not found, did you mean: command 'lxlock' from deb lxlock command 'slock' from deb suckless-tools command 'vlock' from deb vlock command 'flock' from deb util-linux command 'rlock' from deb ruby-lockfile command 'wlock' from deb sendfile command 'xclock' from deb x11-apps command 'mlock' from deb mlock
Try: sudo apt install <deb name>
$ xclock
Command 'xclock' not found, but can be installed with:
sudo apt install x11-apps

If you really mean xlock, then according to its Ubuntu man xlock-page it is removed after Ubuntu 12.04 LTS

I found PPA ppa:chaocrator-ppa/anarchy (it has package for 16.04 LTS, but not for 18.04 LTS) with needed xlockmore-gl package. You can install it with commands below:

cd ~/Downloads
wget
sudo apt-get install ./xlockmore-gl_5.31-0~xenial_amd64.deb
3

You can download and install it manually:

1. Download archive from
2. Unpack (into e.g. /tmp/xlockmore)
3. Install build deps: apt install build-essential libx11-dev libxext-dev libxt-dev
4. cd /tmp/xlockmore; ./configure; make; make install

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like