AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1027387
Accepted
Svp
Svp
Asked: 2018-04-24 00:51:20 +0800 CST2018-04-24 00:51:20 +0800 CST 2018-04-24 00:51:20 +0800 CST

安装 Clang ++ 时未满足的依赖项 [重复]

  • 772
这个问题在这里已经有了答案:
如何安装clang++? (3 个回答)
4年前关闭。

尝试sudo apt-get installClang++ 时出现以下错误:

Note, selecting 'clang-tidy-4.0' for regex 'Clang+'
Note, selecting 'python-clang-5.0' instead of 'python-clang-x.y'
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:
python-clang-3.5 : Breaks: python-clang-3.6 but 1:3.6.2-3ubuntu2 is to be installed
                Breaks: python-clang-3.7 but 1:3.7.1-2ubuntu2 is to be installed
                Breaks: python-clang-3.8 but 1:3.8-2ubuntu4 is to be installed
python-clang-3.6 : Breaks: python-clang-3.5 but 1:3.5.2-3ubuntu1 is to be installed
                Breaks: python-clang-3.7 but 1:3.7.1-2ubuntu2 is to be installed
                Breaks: python-clang-3.8 but 1:3.8-2ubuntu4 is to be installed
python-clang-3.7 : Breaks: python-clang-3.5 but 1:3.5.2-3ubuntu1 is to be installed
                Breaks: python-clang-3.6 but 1:3.6.2-3ubuntu2 is to be installed
                Breaks: python-clang-3.8 but 1:3.8-2ubuntu4 is to be installed
python-clang-3.8 : Breaks: python-clang-3.5 but 1:3.5.2-3ubuntu1 is to be installed
                Breaks: python-clang-3.6 but 1:3.6.2-3ubuntu2 is to be installed
                Breaks: python-clang-3.7 but 1:3.7.1-2ubuntu2 is to be installed
python-clang-3.9 : Breaks: python-clang-3.5 but 1:3.5.2-3ubuntu1 is to be installed
                Breaks: python-clang-3.6 but 1:3.6.2-3ubuntu2 is to be installed
                Breaks: python-clang-3.7 but 1:3.7.1-2ubuntu2 is to be installed
                Breaks: python-clang-3.8 but 1:3.8-2ubuntu4 is to be installed
python-clang-4.0 : Breaks: python-clang-3.5 but 1:3.5.2-3ubuntu1 is to be installed
                Breaks: python-clang-3.6 but 1:3.6.2-3ubuntu2 is to be installed
                Breaks: python-clang-3.7 but 1:3.7.1-2ubuntu2 is to be installed
                Breaks: python-clang-3.8 but 1:3.8-2ubuntu4 is to be installed
                Breaks: python-clang-3.9 but 1:3.9.1-4ubuntu3~16.04.2 is to be installed
python-clang-5.0 : Breaks: python-clang-3.5 but 1:3.5.2-3ubuntu1 is to be installed
                Breaks: python-clang-3.6 but 1:3.6.2-3ubuntu2 is to be installed
                Breaks: python-clang-3.7 but 1:3.7.1-2ubuntu2 is to be installed
                Breaks: python-clang-3.8 but 1:3.8-2ubuntu4 is to be installed
                Breaks: python-clang-3.9 but 1:3.9.1-4ubuntu3~16.04.2 is to be installed

我不确定如何解决这些依赖关系,也不知道一个好的解决方法。我对 Linux 比较陌生。

我正在使用 Ubuntu 16.04 LTS

任何信息,将不胜感激。就我在论坛上能够阅读的内容而言,我应该删除罪魁祸首程序或将其升级到所需的版本。但是从错误消息中我无法真正收集到这种情况下的罪魁祸首。

software-installation dependencies 16.04 clang
  • 1 1 个回答
  • 5021 Views

1 个回答

  • Voted
  1. Best Answer
    steeldriver
    2018-04-24T03:28:42+08:002018-04-24T03:28:42+08:00

    问题是没有包Clang++甚至没有clang++,因此apt将给定名称视为正则表达式并尝试安装每个匹配的包 - 其中许多相互冲突:

    $ sudo apt-get install --dry-run Clang++
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Note, selecting 'clang-modernize-5.0' for regex 'Clang+'
    Note, selecting 'libclang-3.6-dev' for regex 'Clang+'
    .
    .
    .
    Note, selecting 'python-clang-3.3' for regex 'clang+'
    Note, selecting 'python-clang-3.4' for regex 'clang+'
    Note, selecting 'python-clang-3.5' for regex 'clang+'
    Note, selecting 'python-clang-3.6' for regex 'clang+'
    Note, selecting 'python-clang-3.7' for regex 'clang+'
    Note, selecting 'python-clang-3.8' for regex 'clang+'
    Note, selecting 'python-clang-3.9' for regex 'clang+'
    .
    .
    .
    

    事实上,与 不同的是gcc/g++,clang将 C 和 C++ 编译器作为单个包提供 - 您可以安装特定版本,例如或简单地通过依赖包clang-3.5为您的系统安装最高优先级的版本:clang

    sudo apt install clang
    

    参见示例如何安装 clang++?

    • 10

相关问题

  • 如何在没有 root 访问权限的情况下安装软件包?

  • 设置 LAMP 堆栈的最简单方法是什么?

  • 我应该在哪里安装 sagemath?

  • How do I install Adobe Flash player?对于 11.10 及更高版本明确修复 11.10 上的 64 位 Flash

  • 如何设置软件中心为非 root 用户安装软件?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve