1

I tried to install lsb-release using sudo apt install lsb-release and I'm getting this error:
Sub-process /usr/bin/dpkg returned an error code (1)

what is this dpkg error and how to resolve it? Is it necesary to install this package to run python(Image processing) codes..or can we continue without it?

  • 1
    dpkg almost for all errors return error code (1). So what's the actual error? – Kulfy Feb 3 at 13:09
  • I'm totally new to Linux and I thought dpkg module has some error in it...Thanks for pointing out..I'll try to find out what the actual error is. – Keerti Feb 3 at 13:41
  • 1
    In the post you have written I tried to install lsb-release using sudo apt install lsb-release and I'm getting this error:, if the error is while installing it must occur again. Try sudo apt install lsb-release in terminal and paste the whole and exact error message you'd receive. – Kulfy Feb 3 at 13:46
  • This was the error: "Errors were encountered while processing: tzdata" and I'm getting the same error while I'm running sudo apt upgrade – Keerti Feb 3 at 17:42
  • Please paste the exact output to question body. One line error message sometimes is not sufficient. – Kulfy Feb 4 at 8:20
1

lsb-release is usually installed by default

To check if lsb-release package is already installed use:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial

Error may apply to all packages

The error message may apply to all packages, not just lsb-release. From:

These are the most common steps to solve the error:

Method 1: Reconfigure Package Database

The first method you can try is to reconfigure the package database. Probably the database got corrupted while installing a package. Reconfiguring often fixes the problem.

sudo dpkg --configure -a

Method 2: Use force install

If a package installation was interrupted previously, you may try to do a force install.

sudo apt-get install -f
  • Thanks for ur answer...the post you've share did help a lot.. – Keerti Feb 3 at 17:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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