从 14.04 升级到 15.04 后无法安装 Ubuntu SDK

从 14.04 升级到 15.04 后无法安装 Ubuntu SDK

我最近从 14.04 升级到了 15.04,这样我就可以开始实现我的一个想法了。升级之前,我安装了 Ubuntu SDK,并且部分运行正常 - 但我遇到了模拟器和编译方面的问题。

有人建议我应该升级到 15.04,而且我已经计划这样做了,因此我从 14.10 升级到了 15.04。

但是,在此过程中,SDK 被删除了。我认为这只是升级过程的正常部分,我可以在升级到 15.04 时重新安装它。

错误的。

当我运行该sudo apt-get install ubuntu-sdk命令时,我得到以下输出:

$ sudo apt-get install ubuntu-sdk
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:
 ubuntu-sdk : Depends: ubuntu-sdk-libs-dev but it is not going to be installed
              Depends: phablet-tools but it is not going to be installed
              Depends: qtcreator but it is not going to be installed
              Depends: qtcreator-plugin-ubuntu but it is not going to be installed
              Depends: ubuntu-device-flash but it is not going to be installed
              Depends: ubuntu-ui-toolkit-autopilot but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试ubuntu-sdk-team通过添加 PPA sudo add-apt-repository ppa:ubuntu-sdk-team/ppa,但出现同样的错误。

输出apt-cache policy ubuntu-sdk

$ apt-cache policy ubuntu-sdk
ubuntu-sdk:
  Installed: (none)
  Candidate: 1.221
  Version table:
     1.221 0
        500 http://mirrors.gigenet.com/ubuntuarchive/ vivid/universe amd64 Packages

apt-cache policy qtcreator

$ apt-cache policy qtcreator
qtcreator:
  Installed: 3.1.1-0ubuntu9
  Candidate: 3.1.1-0ubuntu9
  Version table:
 *** 3.1.1-0ubuntu9 0
        500 http://mirrors.gigenet.com/ubuntuarchive/ vivid/universe amd64 Packages
        100 /var/lib/dpkg/status

我该如何修复此问题?

编辑

输出自apt-cache policy ubuntu-sdk-libs-dev

ubuntu-sdk-libs-dev:
  Installed: 1.221
  Candidate: 1.221
  Version table:
 *** 1.221 0
        500 http://mirrors.gigenet.com/ubuntuarchive/ vivid/universe amd64 Packages
        100 /var/lib/dpkg/status

编辑2

输出自sudo aptitude install ubuntu-sdk

$ sudo aptitude install ubuntu-sdk
The following NEW packages will be installed:
  account-plugin-tools{a} accountsservice-ubuntu-schemas{a} click-dev{ab} 
  click-doc{a} gdb-multiarch{a} libandroid-properties1{a} 
  libcontent-hub-doc{a} libhardware2{a} libhybris-common1{a} libpay2{a} 
  libqmenumodel0{a} libqt5bluetooth5{a} libqt5bluetooth5-bin{a} 
  libqt5declarative5{a} libqt5nfc5{a} libtrust-store1{a} 
  libu1db-qt5-examples{a} libubuntu-location-service2{a} 
  libubuntu-platform-hardware-api2{a} libubuntuoneauth-2.0-0{a} 
  libusermetricsoutput1{a} pay-service{a} phablet-tools{a} python-mock{a} 
  qml-module-qtqml-models2{a} qml-module-qttest{a} qt3d5-examples{a} 
  qtbase5-doc{a} qtbase5-examples{a} qtconnectivity5-examples{a} 
  qtcreator{a} qtcreator-plugin-cmake{a} qtcreator-plugin-go{a} 
  qtcreator-plugin-qnx{a} qtcreator-plugin-remotelinux{a} 
  qtcreator-plugin-ubuntu{a} qtcreator-plugin-ubuntu-common{a} 
  qtcreator-plugin-valgrind{a} qtdeclarative5-examples{a} 
  qtdeclarative5-ubuntu-settings-components{a} 
  qtdeclarative5-ubuntu-thumbnailer0.1{a} 
  qtdeclarative5-unity-notifications-plugin{a} qtgraphicaleffects5-doc{a} 
  qtlocation5-examples{a} qtmultimedia5-doc{a} qtmultimedia5-examples{a} 
  qtquick1-5-examples{a} qtscript5-doc{a} qtscript5-examples{a} 
  qtsensors5-examples{a} qtsvg5-doc{a} qtsvg5-examples{a} 
  qtsystems5-examples{a} qttools5-doc{a} qttools5-examples{a} 
  qtxmlpatterns5-examples{a} thumbnailer-common{a} thumbnailer-service{a} 
  ubuntu-emulator{a} ubuntu-emulator-runtime:i386{a} ubuntu-sdk 
  ubuntu-sdk-libs-dev ubuntu-ui-toolkit-autopilot{a} 
  ubuntu-ui-toolkit-examples{a} ubuntuone-credentials-common{a} 
  unity-plugin-scopes{a} unity-scope-tool{a} unity8-common{a} 
  unity8-fake-env{a} unity8-private{a} 
The following packages will be REMOVED:
  libprocess-cpp-doc{u} libproperties-cpp-doc{u} 
0 packages upgraded, 70 newly installed, 2 to remove and 0 not upgraded.
Need to get 105 MB/119 MB of archives. After unpacking 287 MB will be used.
The following packages have unmet dependencies:
 click-dev : Depends: python3-click (= 0.4.38.5) but 0.4.39.1+15.10.20150702-0~461~ubuntu14.04.1 is installed.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:              
1)     click-dev [Not Installed]                                        
2)     qtcreator-plugin-ubuntu [Not Installed]                          
3)     ubuntu-sdk [Not Installed]                                       

     Leave the following dependencies unresolved:                       
4)     libproperties-cpp-dev recommends libproperties-cpp-doc           
5)     libprocess-cpp-dev recommends libprocess-cpp-doc                 
6)     qtcreator-plugin-ubuntu-common recommends qtcreator-plugin-ubuntu


Accept this solution? [Y/n/q/?] 

编辑3:输出自apt-cache policy python3-click

$ apt-cache policy python3-click
python3-click:
  Installed: 0.4.39.1+15.10.20150702-0~461~ubuntu14.04.1
  Candidate: 0.4.39.1+15.10.20150702-0~461~ubuntu14.04.1
  Version table:
 *** 0.4.39.1+15.10.20150702-0~461~ubuntu14.04.1 0
        100 /var/lib/dpkg/status
     0.4.38.5 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages

答案1

ubuntu-sdk无法安装的原因是因为python3-click已经安装的软件包版本高于某些依赖项所需的版本,并且该版本不是来自主存储库。

您需要降级python3-click已安装的版本。您可以通过运行sudo aptitude install python3-click=0.4.38.5或浏览给出的解决方案列表sudo aptitude install ubuntu-sdk并选择降级软件包的版本来执行此操作。

答案2

在您最后一次编辑之后,软件包python3-click阻止了 的安装ubuntu-sdk。因此,请删除(通过 deb 文件手动?)已安装的版本并从 Ubuntu 存储库安装该版本。

sudo aptitude reinstall python3-click
sudo aptitude install ubuntu-sdk

相关内容