`E: Package 'dialog' has no installation candidate` on `pihole -up`

I've been having trouble updating Pi-hole on Raspbian GNU/Linux 10 (buster). I haven't made any recent changes, aside from regular updates, so I'm unsure what the source of the problem is. I've run sudo apt-get update and sudo apt-get-upgrade and those both appear to be up-to-date.

Expected Behaviour:

I connect via ssh and run pihole -up and the update completes as expected.

Actual Behaviour:

I run pihole -up and receive the following output:

  [i] SELinux not detected
  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.3.19-1~deb10u1

  [✓] Checking apt-get for upgraded packages... up to date!

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils

  [✓] Supported OS detected
  [i] Checking for / installing Required dependencies for this install script...
  [✓] Checking for git
  [✓] Checking for iproute2
  [i] Checking for dialog (will be installed)
  [✓] Checking for ca-certificates
  [i] Waiting for package manager to finish (up to 30 seconds)
  [i] Processing apt-get install(s) for: dialog, please wait...

E: Package 'dialog' has no installation candidate

Can you please help me diagnose and resolve the problem? Thanks in advance for giving it a look!

Debug Token:

/mnCBwih8/

This looks very similar to Pi-Hole Update Dialog installation?! (in German, though).

What's the ouput of:

sudo apt-cache policy dialog
cat /etc/apt/sources.list

Thanks for the reply, I hadn't seen that other thread!

sudo apt-cache policy dialog gives me:

dialog:
  Installed: (none)
  Candidate: (none)
  Version table:

and cat /etc/apt/sources.list gives me:

#deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Are you sure about that line?

If so, try removing the comment marker (#) at the start of just that line.

Afterwards, run

sudo apt-get update
sudo apt-cache policy dialog
1 Like

Good catch... I don't know how or why that was commented out. But I removed the comment marker, ran sudo apt-get update and now sudo apt-cache policy dialog is returning the following:

dialog:
  Installed: (none)
  Candidate: 1.3-20190211-1
  Version table:
     1.3-20190211-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

It looks like pihole -up is working as expected. I'll take a look and see if I can figure out how/why that line got commented out. But it at least looks like I'm able to update now without issue.

Thanks for the help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.