Every time I try to install any using apt-get install, I get the error saying

Errors were encountered while processing: libtk8.6:amd64 tk8.6-blt2.5 E: Sub-process /usr/bin/dpkg returned an error code (1)

I am getting the same error on trying sudo apt install --reinstall linux-generic, which I was doing in an attempt to fix the issue according to the solution here. I had gotten this error first while trying to install cd CLI using

$ wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - $ echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources

Any solutions are appreciated

  • 1
    Please edit the question and paste the full error message. dpkg for almost every error shows E: Sub-process /usr/bin/dpkg returned an error code (1). – Kulfy Apr 19 '19 at 18:22

Every time I try to install packages I get similar errors. Here is my process for resolving those:

  • If step 1 succeeds, break.
  • If step n succeeds, go to step 1.
  • If step n fails, go to step n+1.


  1. sudo apt install package-i-want
    • dependency X failed or erred in some way
  2. sudo dpkg --configure -a
  3. sudo apt -f install
  4. sudo apt install --reinstall X
  5. Go to step 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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