Dependências não satisfeitas ao instalar o Clang ++ [duplicado]

3

Eu recebo o seguinte erro ao tentar sudo apt-get install Clang ++:

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

Não sei ao certo como resolver essas dependências e não conheço uma boa solução para isso. Eu sou relativamente novo no Linux.

Estou usando o Ubuntu 16.04 LTS

Qualquer informação seria apreciada. Tanto quanto eu tenho sido capaz de ler aqui nos fóruns eu devo remover o programa culpado ou atualizá-lo para a versão que é necessária. Mas a partir da mensagem de erro, não consigo realmente reunir o que é o culpado neste caso.

    
por Svp 23.04.2018 / 10:51

1 resposta

6

O problema é que não há pacote Clang++ ou mesmo clang++ , então apt está tratando o nome dado como uma expressão regular e tentando instalar todos os pacotes de correspondência - muitos dos que conflitam entre si:

$ 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+'
.
.
.

Na verdade, ao contrário de gcc/g++ , clang fornece compiladores C e C ++ como um único pacote - você pode instalar uma versão específica como clang-3.5 ou simplesmente instalar a versão de maior prioridade para o seu sistema através da clang dependency package:

sudo apt install clang

Veja, por exemplo, Como instalar o clang ++?

    
por steeldriver 23.04.2018 / 13:28