软件包“libclang-dev”没有安装候选者

软件包“libclang-dev”没有安装候选者

尝试使用这些安装 libclang-dev指示。但是,我遇到了这个错误。

sudo apt-get update
sudo apt-get -y install libclang-dev

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libclang-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libclang-dev' has no installation candidate

最初的问题实际上是尝试安装 RStudio:

gdebi rstudio-2022.07.2-576-amd64.deb                             
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libclang-dev

一些有用的信息:

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy

sudo cat /etc/apt/sources.list

deb http://se.archive.ubuntu.com/ubuntu/ jammy main restricted
deb http://se.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
deb http://se.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://se.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
deb http://se.archive.ubuntu.com/ubuntu/ jammy-backports main restricted multiverse

答案1

libclang-dev位于 中universe,您需要将其添加到您的存储库中:

deb http://se.archive.ubuntu.com/ubuntu/ jammy main restricted universe
deb http://se.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe

为了找到这个,我rmadisondevscripts包中使用了:

$ rmadison -u ubuntu libclang-dev
 libclang-dev | 1:3.4-0ubuntu1        | trusty/universe         | amd64, arm64, armhf, i386, powerpc
 libclang-dev | 1:3.8-33ubuntu3       | xenial/universe         | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libclang-dev | 1:3.8-33ubuntu3.1     | xenial-updates/universe | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libclang-dev | 1:6.0-41~exp4         | bionic/universe         | amd64, arm64, armhf, i386, ppc64el, s390x
 libclang-dev | 1:6.0-41~exp5~ubuntu1 | bionic-updates/universe | amd64, arm64, armhf, i386, ppc64el, s390x
 libclang-dev | 1:10.0-50~exp1        | focal/universe          | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
 libclang-dev | 1:14.0-55~exp2        | jammy/universe          | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
 libclang-dev | 1:15.0-55.1ubuntu1    | kinetic/universe        | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
 libclang-dev | 1:15.0-55.1ubuntu1    | lunar/universe          | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x

相关内容