安装 zlib1g-dev。对 libc-dev libc6-dev 的依赖性未得到满足

安装 zlib1g-dev。对 libc-dev libc6-dev 的依赖性未得到满足

我正在尝试在 Windows Linux 子系统上安装 zlib1gdev。我已经执行了 dpkg --configure 以及更新和升级。因此,不幸的是,第一条评论没有用。

我得到了错误

    sudo apt-get install -f zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 zlib1g-dev : Depends: libc6-dev but it is not going to be installed or
                       libc-dev
E: Unable to correct problems, you have held broken packages.

所以如果我尝试比较来源

    sudo apt-cache policy libc6-dev libc6 libc-dev libc

libc6-dev:
  Installed: (none)
  Candidate: 2.23-0ubuntu11
  Version table:
     2.23-0ubuntu11 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     2.23-0ubuntu10 500
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     2.23-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libc6:
  Installed: 2.27-3ubuntu1
  Candidate: 2.27-3ubuntu1
  Version table:
 *** 2.27-3ubuntu1 100
        100 /var/lib/dpkg/status
     2.23-0ubuntu11 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     2.23-0ubuntu10 500
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     2.23-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libc-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
N: Unable to locate package libc

因此,为了安装 libc6-dev,我需要降级 libc6,但由于它是系统的基本部分,因此我收到警告

    You are about to do something potentially harmful
To continue type in the phrase ‘Yes, do as I say!’
 ?]

我正朝着正确的方向前进,我应该降级 libc6 或者还有其他方法来解决这个安装问题。

答案1

请尝试以下操作:

1)dpkg --configure -a

2)apt-get update然后重新安装您的软件包。

相关内容