パッケージ '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

おすすめ記事