Problema com dependências ao instalar o ubuntu-sdk em 16.04

Problema com dependências ao instalar o ubuntu-sdk em 16.04

Recebo este erro ao instalar o ubuntu-sdk na instalação limpa do Ubuntu 16.04 64 bits:

The following packages have unmet dependencies:
 ubuntu-sdk : Depends: ubuntu-sdk-libs-dev but it is not going to be installed
              Depends: autopilot-desktop but it is not installable
              Depends: intltool but it is not installable
              Depends: libcontent-hub-doc but it is not installable
              Depends: phablet-tools but it is not going to be installed
              Depends: ubuntu-device-flash but it is not going to be installed
              Depends: ubuntu-sdk-ide but it is not going to be installed
E: Unable to correct problems, you have held broken packages.`

Como resolver este problema.

Responder1

Você precisa instalar algumas dependências separadamente, uma por uma. No meu caso, estava jogando:

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:
 ubuntu-sdk : Depends: phablet-tools but it is not going to be installed
              Depends: ubuntu-sdk-ide but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Então, primeiro tentei instalar o phablet-tools:

sudo apt install phablet-tools

Ele lança:

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:
 phablet-tools : Depends: android-tools-adb (>= 4.2.2)
                 Depends: android-tools-fastboot (>= 4.2.2)
E: Unable to correct problems, you have held broken packages.

Então instalei Android-tools-adb e Android-tools-fastboot um por um usando:

sudo apt install android-tools-adb
sudo apt install android-tools-fastboot

Então tentei novamente instalar o ubuntu-sdk usando:

sudo apt install ubuntu-sdk

E funcionou.

Portanto, a questão toda é que você deve instalar todas as dependências uma por uma. Aplica-se a qualquer pacote que você deseja instalar, não apenas ao ubuntu-sdk.

Responder2

Se você estiver recebendo erros como dependências não atendidas ao instalar o SDK, será necessário instalar todas as dependências mencionadas com erro. então finalmente instale o ubuntu-sdk. Funciona bem.

informação relacionada