
Я получаю эту ошибку при установке ubuntu-sdk на чистой установке Ubuntu 16.04 64bit:
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.`
Как решить эту проблему.
решение1
Вам нужно установить некоторые зависимости отдельно одну за другой. В моем случае это было выбрасывание:
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.
Итак, я сначала попробовал установить phablet-tools:
sudo apt install phablet-tools
Он выдает:
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.
Итак, я установил android-tools-adb и android-tools-fastboot по одному, используя:
sudo apt install android-tools-adb
sudo apt install android-tools-fastboot
Затем я снова попытался установить ubuntu-sdk с помощью:
sudo apt install ubuntu-sdk
И это сработало.
Итак, вся суть в том, что вам нужно установить все зависимости одну за другой. Это применимо к любому пакету, который вы хотите установить, а не только к ubuntu-sdk.
решение2
Если при установке sdk вы получаете ошибки типа неудовлетворенных зависимостей, вам нужно установить все зависимости, которые упоминаются в ошибке. Затем, наконец, установите ubuntu-sdk. Работает отлично.