Project

General

Profile

Issues #221

Ubuntu22.04 无法安装GCC

Added by 振华 almost 2 years ago. Updated almost 2 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Start date:
01/03/2023
Due date:
% Done:

0%

Estimated time:
目标版本:
LKD3588 Linux SDK 1.0
Component_fae:
Probability:
High
Seriousness:
Problem Type:
Name:
Tel.:

Description

提示如下错误:

root@LPA3588:~# apt install gcc
Reading package lists... Done
Building dependency tree... Done
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:
 gcc-11 : Depends: cpp-11 (= 11.3.0-1ubuntu1~22.04) but 11.2.0-19ubuntu1 is to be installed
          Depends: gcc-11-base (= 11.3.0-1ubuntu1~22.04) but 11.2.0-19ubuntu1 is to be installed
 libasan6 : Depends: gcc-11-base (= 11.3.0-1ubuntu1~22.04) but 11.2.0-19ubuntu1 is to be installed
 libatomic1 : Depends: gcc-12-base (= 12.1.0-2ubuntu1~22.04) but 12-20220319-1ubuntu1 is to be installed
 libcc1-0 : Depends: gcc-12-base (= 12.1.0-2ubuntu1~22.04) but 12-20220319-1ubuntu1 is to be installed
 libgcc-11-dev : Depends: gcc-11-base (= 11.3.0-1ubuntu1~22.04) but 11.2.0-19ubuntu1 is to be installed
 libhwasan0 : Depends: gcc-12-base (= 12.1.0-2ubuntu1~22.04) but 12-20220319-1ubuntu1 is to be installed
 libitm1 : Depends: gcc-12-base (= 12.1.0-2ubuntu1~22.04) but 12-20220319-1ubuntu1 is to be installed
 liblsan0 : Depends: gcc-12-base (= 12.1.0-2ubuntu1~22.04) but 12-20220319-1ubuntu1 is to be installed
 libtsan0 : Depends: gcc-11-base (= 11.3.0-1ubuntu1~22.04) but 11.2.0-19ubuntu1 is to be installed
 libubsan1 : Depends: gcc-12-base (= 12.1.0-2ubuntu1~22.04) but 12-20220319-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

早期的版本hold住了,需要unhold,解决方法

sudo apt list --installed | grep -v oldstable | cut -d/ -f1 | xargs apt-mark unhold

Also available in: Atom PDF