$ sudo apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vncviewer is a virtual package provided by:
  xtightvncviewer 1.3.10-0ubuntu3
  tigervnc-viewer 1.7.0+dfsg-7ubuntu1
You should explicitly select one to install.

E: Package 'vncviewer' has no installation candidate

All this means is that there is no package that exists in your sources list that matches that name exactly. The best approach (IMHO) to take when faced by an issue like this is to begin by checking Ubuntu Package Search using the keyword of what you were trying to find. In this case "vncviewer" is actually embedded in the valid package name. Even if it wasn't you can still search the package contents for specific filenames which can also be a successful way of locating which package contains a command/program you are attempting to locate. Either of which should get you where you are attempting to go.

In your specific case, you have a couple of easy options. Both of which require enabling the Universe Repository first.

Once that is complete, you can either install the gtk version with sudo apt install gvncviewer or the X version with sudo apt install xtightvncviewer

The GTK version has fewer dependencies and a smaller package size. There's a decent (if somewhat dated) Community Help wiki on VNC Clients.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.