Unable to update package cache

Please follow the below template, it will help us to help you!

Expected Behaviour:

No problem

Actual Behaviour:

 curl -sSL https://install.pi-hole.net | sudo bash -x
+ set -e
++ cat
+ DNS_SERVERS='Google (ECS);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
DNS.WATCH;84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered + ECS);9.9.9.11;149.112.112.11;2620:fe::11;
Cloudflare;1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
+ installLogLoc=/etc/pihole/install.log
+ setupVars=/etc/pihole/setupVars.conf
+ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+ coltable=/opt/pihole/COL_TABLE
+ webroot=/var/www/html
+ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
+ webInterfaceDir=/var/www/html/admin
+ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
+ PI_HOLE_LOCAL_REPO=/etc/.pihole
+ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
+ PI_HOLE_INSTALL_DIR=/opt/pihole
+ PI_HOLE_CONFIG_DIR=/etc/pihole
+ PI_HOLE_BIN_DIR=/usr/local/bin
+ PI_HOLE_BLOCKPAGE_DIR=/var/www/html/pihole
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ regexFile=/etc/pihole/regex.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ PRIVACY_LEVEL=0
+ '[' -z root ']'
+ '[' -t 0 ']'
+ screen_size='24 80'
+ printf -v rows %d 24
+ printf -v columns %d 80
+ r=12
+ c=40
+ r=20
+ c=70
+ skipSpaceCheck=false
+ reconfigure=false
+ runUnattended=false
+ INSTALL_WEB_SERVER=true
+ [[ -f /opt/pihole/COL_TABLE ]]
+ COL_NC='\e[0m'
+ COL_LIGHT_GREEN='\e[1;32m'
+ COL_LIGHT_RED='\e[1;31m'
+ TICK='[\e[1;32m✓\e[0m]'
+ CROSS='[\e[1;31m✗\e[0m]'
+ INFO='[i]'
+ DONE='\e[1;32m done!\e[0m'
+ OVER='\r\033[K'
+ binary=tbd
+ counter=0
+ [[ '' != true ]]
+ main
+ local 'str=Root user check'
+ printf '\n'

+ [[ 0 -eq 0 ]]
+ printf '  %b %s\n' '[\e[1;32m✓\e[0m]' 'Root user check'
  [✓] Root user check
+ show_ascii_berry
+ echo -e '
        \e[1;32m.;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           '\''ccll:;ll .oooodc
             .;cll.;;looo:.
                 \e[1;31m.. '\'','\''.
                .'\'',,,,,,'\''.
              .'\'',,,,,,,,,,.
            .'\'',,,,,,,,,,,,....
          ....'\'''\'''\'',,,,,,,'\''.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'\''......
            ....'\'',,,,,,,,,,,,.
               .'\'',,,,,,,,,'\''.
                .'\'',,,,,,'\''.
                  ..'\'''\'''\''.\e[0m
'

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

+ make_temporary_log
++ mktemp /tmp/pihole_temp.XXXXXX
+ TEMPLOG=/tmp/pihole_temp.0QBoQP
+ exec
+ rm /tmp/pihole_temp.0QBoQP
+ distro_check
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ PKG_MANAGER=apt-get
+ UPDATE_PKG_CACHE='apt-get update'
+ PKG_INSTALL=(${PKG_MANAGER} --yes --no-install-recommends install)
+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+ APT_SOURCES=/etc/apt/sources.list
+ awk 'BEGIN{a=1;b=0}/bionic main/{a=0}/bionic.*universe/{b=1}END{exit a + b}' /etc/apt/sources.list
+ apt-get install --dry-run iproute2
+ iproute_pkg=iproute2
+ is_command php
+ local check_command=php
+ command -v php
+ [[ '' != true ]]
+ apt-get install --dry-run php
+ phpVer=php5
+ apt-get install --dry-run php5-sqlite3
+ phpSqlite=sqlite
+ INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail)
+ PIHOLE_DEPS=(cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf libcap2)
+ PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-${phpSqlite})
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ [[ -f /etc/pihole/setupVars.conf ]]
+ [[ false == true ]]
+ verifyFreeDiskSpace
+ local 'str=Disk space check'
+ local required_free_kilobytes=51200
+ local existing_free_kilobytes
++ df -Pk
++ awk '{print $4}'
++ grep -m1 '\/$'
+ existing_free_kilobytes=7212860
+ [[ 7212860 =~ ^([0-9])+$ ]]
+ [[ 7212860 -lt 51200 ]]
+ printf '  %b %s\n' '[\e[1;32m✓\e[0m]' 'Disk space check'
  [✓] Disk space check
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ printf '  %b %s...' '[i]' 'Update local cache of available packages'
  [i] Update local cache of available packages...+ eval 'apt-get update'
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;31m✗\e[0m]' 'Update local cache of available packages'
  [✗] Update local cache of available packages
+ printf '  %bError: Unable to update package cache. Please try "%s"%b' '\e[1;31m' 'apt-get update' '\e[0m'
  Error: Unable to update package cache. Please try "apt-get update"+ return 1
+ exit 1

When apt-get update is run :

apt-get update
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspbian.org jessie InRelease
Get:1 https://dev2day.de jessie InRelease [301 B]
Ign https://dev2day.de jessie InRelease
Get:2 https://dev2day.de jessie Release.gpg [303 B]
Ign https://dev2day.de jessie Release.gpg
Get:3 https://dev2day.de jessie Release [299 B]
Ign https://dev2day.de jessie Release
Get:4 https://dev2day.de jessie/main armhf Packages [322 B]
Get:5 https://dev2day.de jessie/main Translation-en_GB [323 B]
Get:6 https://dev2day.de jessie/main Translation-en [320 B]
Get:7 https://dev2day.de jessie/main armhf Packages [322 B]
Get:8 https://dev2day.de jessie/main Translation-en_GB [323 B]
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Get:9 https://dev2day.de jessie/main Translation-en [320 B]
Get:10 https://dev2day.de jessie/main armhf Packages [322 B]
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Get:11 https://dev2day.de jessie/main Translation-en_GB [323 B]
Get:12 https://dev2day.de jessie/main Translation-en [320 B]
Get:13 https://dev2day.de jessie/main armhf Packages [322 B]
Get:14 https://dev2day.de jessie/main Translation-en_GB [323 B]
Get:15 https://dev2day.de jessie/main Translation-en [320 B]
Get:16 https://dev2day.de jessie/main armhf Packages [322 B]
Err https://dev2day.de jessie/main armhf Packages
  HttpError404
Get:17 https://dev2day.de jessie/main Translation-en_GB [323 B]
Ign https://dev2day.de jessie/main Translation-en_GB
Get:18 https://dev2day.de jessie/main Translation-en [320 B]
Ign https://dev2day.de jessie/main Translation-en
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Get:19 http://archive.raspbian.org jessie/main Sources [7,763 kB]
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Get:20 http://archive.raspbian.org jessie/contrib Sources [64.5 kB]
Get:21 http://archive.raspbian.org jessie/non-free Sources [113 kB]
Get:22 http://archive.raspbian.org jessie/rpi Sources [1,132 B]
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
W: Failed to fetch https://dev2day.de/pms/dists/jessie/main/binary-armhf/Packages  HttpError404

E: Some index files failed to download. They have been ignored, or old ones used instead.

Debug Token:

[Replace this text with the debug token provided from running pihole -d (or running the debug script through the web interface] cannot run pihole -d

You have a damaged OS (edit - package) install. Since you are running Jessie, which is nearing EOL, you may want to upgrade to a later OS while you resolve the OS problem. Pi-Hole supports Stretch and Buster.

Thank you for quick response and I fixed it by editing the installation script to skip apt-get update cache command

Checkout below:

This certainly fixes the problem. Thanks

1 Like

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