Apt error during install

Hello everyone!

I have been able to install pi-hole successfully in past but don't know this time it's not going well.

I am using Ubuntu 18.04x64, computer.

root@Linux:~# sudo bash basic-install.sh

  [✓] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [✓] Disk space check
  [✗] Update local cache of available packages
  Error: Unable to update package cache. Please try "apt-get update"root@Linux:~# 

Any help would be much appreciated.

This is a hint as to what you need to do.

1 Like

Here's the output.

root@Linux:~# bash basic-install.sh

  [✓] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [✓] Disk space check
  [✗] Update local cache of available packages
  Error: Unable to update package cache. Please try "apt-get update"root@Linux:~# apt-get update
Ign:1 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic InRelease
Err:2 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease                  
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease                            
Hit:6 http://dl.google.com/linux/chrome/deb stable Release                                    
Hit:7 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease    
Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Reading package lists... Done                                
E: The repository 'cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@Linux:~# 

The process stop here. What should be my next step?

Update

I found an easy fix.

First I did

sudo rm -rf /var/lib/apt/lists/* 
sudo apt-get update

Then, I followed https://askubuntu.com/a/1067598

Now, I am able to install pi-hole successfully. :slight_smile:

Thanks

Had the same problem

[i] Existing PHP installation detected : PHP version 7.0.27-0+deb9u1
[i] Performing unattended setup, no whiptail dialogs will be displayed
[✓] Disk space check
[✗] Update local cache of available packages
Error: Unable to update package cache. Please try "apt-get update"
Unable to complete update, please contact Pi-hole Support
pi@raspberrypi3:~ $ apt-get update
Reading package lists... Done
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
pi@raspberrypi3:~ $

Tried your fix, which now tells me everything is up to date but it has not updated pihole at all, still shown as available update in pihole dashboard

pi@raspberrypi3:~ $ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date

Please make sure you are trying to install as sudo user

sudo -s

Managed to get apt-get update working by just using the su command, it updated but still tells me pihole is up to date when it is not

It was the "sudo rm -rf /var/lib/apt/lists/*" that broke it

EDIT - Now dashboard is telling me it is updated.... not sure what's going on as it did not update via SSH

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