在这种特殊情况下,如何修复损坏的包?

分享于 

9分钟阅读

ubuntu

  繁體

问题

运行以下四个命令后,中断的软件包状态:


1) apt-get purge nvidia*


2) apt-get autoremove


3) apt-get dist-upgrade


4) apt-get autoremove



我发现unity tweak工具,ubuntu桌面和一些基本的软件包已经从系统中删除,

synaptic package manager不让我安装损坏的包。我尝试通过运行 sudo apt-get install -fsudo dpkg --configure -a 但这不管用


~ $ sudo apt-get install -f


Reading package lists... Done


Building dependency tree 


Reading state information... Done


The following packages were automatically installed and are no longer required:


 libbonoboui2-0 libbonoboui2-common libglade2-0 libgnome2-0 libgnome2-bin libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common libidl-2-0 liborbit2 python-gconf


 python-gnome2 python-pyorbit


Use 'sudo apt autoremove' to remove them.


0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.



当我尝试安装unity-tweak-tool时,它提供了中断状态消息以及依赖


sudo apt-get install unity-tweak-tool


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:


 unity-tweak-tool : Depends: unity-webapps-common but it is not going to be installed


E: Unable to correct problems, you have held broken packages.



当我尝试安装依赖项时,它仍然抱怨包损坏,

E: Package 'qtbase-abi-5-5-1' has no installation candidate 或者 E: Package 'qtdeclarative-abi-5-5-0' has no installation candidate


答案1

出于原因,dpkg --configure -a从Ubuntu中删除了几个版本(从16.04开始我相信),因此它不再工作,并且会告诉你-a是一个无效的目标。

获取损坏的包的名称及依赖项之后,可以尝试apt-get remove包或依赖项,

运行apt-get install -f,继续此过程,直到没有处于中断状态的包。


答案2

我按以下顺序进行了以下操作:


sudo ppa-purge ppa:kubuntu-ppa/backports


sudo apt-get install -f


sudo apt autoremove


sudo apt-get install unity-tweak-tool



当我清除ppa时,结果是:


The following package was automatically installed and is no longer required:


 libxcb-xinerama0


Use 'sudo apt autoremove' to remove it.


The following additional packages will be installed:


 packagekit-backend-aptcc python3-packagekit


Suggested packages:


 libqt4-declarative-folderlistmodel libqt4-declarative-gestures


 libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer


 libqt4-dev libqt5libqgtk2 qt4-qtconfig packagekit-backend-smart


Recommended packages:


 packagekit


The following packages will be REMOVED:


 libpackagekit-glib2-18


The following NEW packages will be installed:


 packagekit-backend-aptcc python3-packagekit


The following packages will be DOWNGRADED:


 aptdaemon aptdaemon-data breeze-icon-theme gir1.2-packagekitglib-1.0


 libqt4-dbus libqt4-declarative libqt4-network libqt4-script libqt4-sql


 libqt4-sql-sqlite libqt4-xml libqt4-xmlpatterns libqt5core5a libqt5dbus5


 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5qml5


 libqt5quick5 libqt5sql5 libqt5sql5-mysql libqt5sql5-sqlite libqt5svg5


 libqt5waylandclient5 libqt5webkit5 libqt5widgets5 libqt5x11extras5


 libqt5xml5 libqtcore4 libqtdbus4 libqtgui4 packagekit packagekit-tools


 python-aptdaemon python-aptdaemon.gtk3widgets python3-aptdaemon


 python3-aptdaemon.gtk3widgets qdbus qtchooser qtcore4-l10n


 qttranslations5-l10n qtwayland5


0 upgraded, 2 newly installed, 43 downgraded, 1 to remove and 0 not upgraded.


Need to get 34.1 MB of archives.


After this operation, 28.5 MB of additional disk space will be used.


Do you want to continue? [Y/n] y



安装unity tweak工具导致了以下结果:


sudo apt-get install unity-tweak-tool


Reading package lists... Done


Building dependency tree 


Reading state information... Done


The following additional packages will be installed:


 libandroid-properties1 libhardware2 libhud2 libhybris libhybris-common1 libmedia1 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libqt5feedback5 libqt5multimedia5 libqt5organizer5


 libqt5positioning5 libqt5quicktest5 libqt5test5 libubuntugestures5 libubuntutoolkit5 libunity-action-qt1 libunity-webapps0 qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings


 qml-module-qtfeedback qml-module-qtgraphicaleffects qml-module-qtquick-layouts qml-module-qtquick-window2 qml-module-qtquick2 qml-module-qttest qml-module-ubuntu-components


 qml-module-ubuntu-layouts qml-module-ubuntu-onlineaccounts qml-module-ubuntu-performancemetrics qml-module-ubuntu-test qml-module-ubuntu-web qtdeclarative5-accounts-plugin


 qtdeclarative5-qtquick2-plugin qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-unity-action-plugin suru-icon-theme ubuntu-mobile-icons ubuntu-ui-toolkit-theme unity-webapps-common


 unity-webapps-qml unity-webapps-service webapp-container webbrowser-app


Suggested packages:


 xul-ext-unity | unity-chromium-extension qtdeclarative5-online-accounts-client0.1 qtdeclarative5-ubuntu-content1 qtdeclarative5-ubuntu-download-manager0.1


 qml-module-ubuntu-onlineaccounts-client


The following NEW packages will be installed:


 libandroid-properties1 libhardware2 libhud2 libhybris libhybris-common1 libmedia1 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libqt5feedback5 libqt5multimedia5 libqt5organizer5


 libqt5positioning5 libqt5quicktest5 libqt5test5 libubuntugestures5 libubuntutoolkit5 libunity-action-qt1 libunity-webapps0 qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings


 qml-module-qtfeedback qml-module-qtgraphicaleffects qml-module-qtquick-layouts qml-module-qtquick-window2 qml-module-qtquick2 qml-module-qttest qml-module-ubuntu-components


 qml-module-ubuntu-layouts qml-module-ubuntu-onlineaccounts qml-module-ubuntu-performancemetrics qml-module-ubuntu-test qml-module-ubuntu-web qtdeclarative5-accounts-plugin


 qtdeclarative5-qtquick2-plugin qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-unity-action-plugin suru-icon-theme ubuntu-mobile-icons ubuntu-ui-toolkit-theme unity-tweak-tool


 unity-webapps-common unity-webapps-qml unity-webapps-service webapp-container webbrowser-app


0 upgraded, 46 newly installed, 0 to remove and 0 not upgraded.


Need to get 45.1 MB of archives.


After this operation, 166 MB of additional disk space will be used.


Do you want to continue? [Y/n] 




bro  PAC  PACK  spec  FIX  
相关文章