clang 拒绝通过 apt 安装

clang 拒绝通过 apt 安装

所以,我想获得虚幻引擎 4,但由于某些奇怪的原因,clang 不想安装。我以前从未使用过 clang,甚至没有安装它,所以我不知道发生了什么。

Registering git hooks... (this will override existing ones!)
Attempting installation of missing package: clang-3.5
+ sudo apt-get install -y clang-3.5
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:
 clang-3.5 : Depends: libclang1-3.5 (= 1:3.5-4ubuntu2~trusty2) but it is     not going to be installed
             Depends: libobjc-4.8-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

这真的很烦人,因为它发生在我身上,我也尝试通过包管理器来获取多个不同的软件,而不仅仅是源。

这是我的名字:

Linux hyperbeam 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

答案1

尝试手动安装依赖项:

sudo apt-get install -y clang-3.5 libclang1-3.5 libobjc-4.8-dev

这可能是由混合存储库引起的。看:

https://askubuntu.com/questions/564282/apt-get-unmet-dependency-but-it-is-not-going-to-be-installed

你有混合的/etc/apt/sources.list吗?您似乎正在尝试从较新的存储库安装一个软件包,但它无权访问具有较新依赖项的存储库。

答案2

只需运行 sudo apt --fix-broken install 安装修复后,在 Ubuntu 18.04.2 上运行 sudo apt update Am 这对我有用

相关内容