title: Issue updating packages to update OS - Raspian
body: <p>Running a pihole on a currently unsupported OS (Raspian 9).  I attempted to run a distro upgrade:</p>
  <pre><code>apt dist-upgrade -y
  </code></pre>
  <p>However it told me there was an issue with two dependencies:</p>
  <pre><code>The following packages have unmet dependencies:
       libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb9u1 is installed
       sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is installed
  </code></pre>
  <p>I tried running the recommended fix:</p>
  <pre><code>'apt --fix-broken install' 
  </code></pre>
  <p>Resulting in:</p>
  <pre><code>    dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '&lt;fd:4&gt;: 
      invalid distance too far back'
      tar: This does not look like a tar archive
      tar: Exiting with failure status due to previous errors
      dpkg-deb: error: subprocess tar returned error exit status 2
      Traceback (most recent call last):
        File &quot;/usr/share/apt-listchanges/DebianFiles.py&quot;, line 124, in readdeb
          output = subprocess.check_output(command)
        File &quot;/usr/lib/python3.5/subprocess.py&quot;, line 316, in check_output
          **kwargs).stdout
        File &quot;/usr/lib/python3.5/subprocess.py&quot;, line 398, in run
          output=stdout, stderr=stderr)
      subprocess.CalledProcessError: Command '['dpkg-deb', '-f', 
      '/var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb', 'Package', 'Source', 
      'Version', 'Architecture', 'Status']' returned non-zero exit status 2
  
      During handling of the above exception, another exception occurred:
  
      Traceback (most recent call last):
        File &quot;/usr/bin/apt-listchanges&quot;, line 243, in &lt;module&gt;
          main(config)
        File &quot;/usr/bin/apt-listchanges&quot;, line 101, in main
          pkg = DebianFiles.Package(deb)
        File &quot;/usr/share/apt-listchanges/DebianFiles.py&quot;, line 215, in __init__
          parser.readdeb(self.path)
        File &quot;/usr/share/apt-listchanges/DebianFiles.py&quot;, line 128, in readdeb
          {'what': file, 'errmsg': str(ex)}) from ex
      NameError: name 'file' is not defined
      E: Invalid archive member header
       E: Prior errors apply to /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
       debconf: apt-extracttemplates failed: No such file or directory
       dpkg: warning: files list file for package 'libsqlite3-0:armhf' missing; assuming package 
      has no files currently installed
      (Reading database ... 134985 files and directories currently installed.)
      Preparing to unpack .../libfreetype6_2.6.3-3.2+deb9u2_armhf.deb ...
      Unpacking libfreetype6:armhf (2.6.3-3.2+deb9u2) over (2.6.3-3.2+deb9u1) ...
      dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
      dpkg-deb: error: subprocess &lt;decompress&gt; returned error exit status 2
      dpkg: error processing archive /var/cache/apt/archives/libfreetype6_2.6.3- 
     3.2+deb9u2_armhf.deb (--unpack):
       cannot copy extracted data for './usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3' to 
      '/usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3.dpkg-new': unexpected end of file or stream
      dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '&lt;fd:4&gt;: invalid distance too far back'
      tar: This does not look like a tar archive
      tar: Exiting with failure status due to previous errors
      dpkg-deb: error: subprocess tar returned error exit status 2
      dpkg: error processing archive /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb (--unpack):
       subprocess dpkg-deb --control returned error exit status 2
      Errors were encountered while processing:
       /var/cache/apt/archives/libfreetype6_2.6.3-3.2+deb9u2_armhf.deb
       /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
      E: Sub-process /usr/bin/dpkg returned an error code (1)
  </code></pre>
  <p>I attempted the following:</p>
  <p>Reconfigure dpkg database</p>
  <pre><code>sudo dpkg --configure -a
  </code></pre>
  <p>Force install the software</p>
  <pre><code>sudo apt-get install -f
  </code></pre>
  <p>Remove software package</p>
  <pre><code>sudo apt-get remove --purge package_name
  </code></pre>
  <p>Remove and overwrite</p>
  <pre><code>sudo ls -l /var/lib/dpkg/info | grep -i package_name
  sudo mv /var/lib/dpkg/info/package_name.* /tmp
  sudo apt-get update
  sudo dpkg -i --force-overwrite /var/cache/apt/archives/full_name_of_package
  </code></pre>
  <p>None of this worked.</p>
  <p>I tried just manually updating the packages and received dependency errors - the issue is trying to update one results in a dependency error for the other and vice versa:</p>
  <pre><code>sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is to b                                                                                                                              e installed
  
  libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb                                                                                                                              9u1 is to be installed
  </code></pre>
  <p>Any idea how to update these two packages when I they apparently require the other one to be updated to update themselves?</p>
  <p>Thanks!</p>