-1

After trying many different command, the lsb-release is always not being able to be installed. Tried sudo apt-get update -y and sudo apt-get install -y lsb-release, it gives the package missing error: enter image description here

Could anyone have any advice on how we can install this package?

user3651247
  • 238
  • 1
  • 7
  • 19

1 Answers1

1

From my machine:

 $ apt policy lsb-release 
lsb-release:
  Installed: 11.1.0ubuntu2
  Candidate: 11.1.0ubuntu2
  Version table:
 *** 11.1.0ubuntu2 500
        500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu focal/main i386 Packages
        100 /var/lib/dpkg/status

The package lsb-release comes from the repository main. The output of sudo apt update suggests that you've missing sources in your sources.list file.

To investigate further, I started a new docker container and disabled all instances of the main repository and I was able to reproduce this issue. You can fix this issue by following the below steps:

  1. You must enable the main repository in order to install the package lsb-release:

    sudo add-apt-repository main
    

    I highly recommend you to enable the Universe repository too:

    sudo add-apt-repository universe
    
  2. Run apt update after enabling the repositories:

    sudo apt update
    
  3. If I'm seeing the output correctly, you have one more issue with the package manager, as stated in this answer remove the offending files with:

    sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf
    
  4. Install lsb-release again:

    sudo apt install lsb-release
    

The package lsb-release should be installed now.

Error404
  • 134
  • 4
  • Thanks for your comments. I have tried your suggestion but looks like `add-apt-repository` not being recognized due to missing some package. Therefore, I am trying to install the package 'sofware-properties-common' but same issue 'has no installation candidate' occurred. I also tried to change my /etc/apt/sources.list file to cover all resources based on the link 'https://gist.github.com/ishad0w/788555191c7037e249a439542c53e170'. However the 'has no installation candidate' still exist. This is same issue when I am trying to install npm `sudo apt install npm`. – user3651247 Feb 20 '22 at 07:56
  • Looks like the above command cannot not be run successfully, which due to the verification issue 'ERROR: cannot verify gist.githubusercontent.com's certificate' – user3651247 Feb 20 '22 at 08:18