Ошибки и проблемы при установке G++ в Ubuntu

Пытаюсь установить g++, когда сталкиваюсь с этой ошибкой:

$ sudo apt-get install g++
[sudo] password for eisha: 
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:
 g++ : Depends: g++-9 (>= 9.3.0-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Вот вывод команды $ apt policy g++:

$ apt policy g++
g++:
  Installed: (none)
  Candidate: 4:9.3.0-1ubuntu2
  Version table:
     4:9.3.0-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

Вот вывод команды $ apt policy g++-9:

$ apt policy g++-9
g++-9:
  Installed: (none)
  Candidate: 9.3.0-17ubuntu1~20.04
  Version table:
     9.3.0-17ubuntu1~20.04 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     9.3.0-10ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

да, я пробовал: sudo apt install build-essentialи вывод примерно такой:

sudo apt install build-essential
[sudo] password for eisha: 
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:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:9.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

И да, я тоже пробовал sudo удачное обновлениея получил очень длинный вывод, и конечные строки были:

Last modification reported: Wed, 26 Jan 2022 19:25:00 +0000
   Release file created at: Wed, 26 Jan 2022 16:17:36 +0000
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/restricted/i18n/Translation-en.xz  
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/universe/binary-amd64/Packages.xz  
W: Some index files failed to download. They have been ignored, or old ones used instead
0
задан 27 January 2022 в 12:08

0 ответов

Другие вопросы по тегам:

Похожие вопросы: